Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Wanet Telecoms Ltd on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

ERR-"INSUFFICIENT KEY COLUMN INFORMATION FOR UPDATING OR REFRESHING"

Status
Not open for further replies.

TNN

Programmer
Sep 13, 2000
417
US
I have opened a recordset with ADO as follows:

adoRsF2Screen.CursorLocation = adUseClient
adoRsF2Screen.CursorType = adOpenStatic
adoRsF2Screen.LockType = adLockOptimistic
adoRsF2Screen.Open Source:=strSQLF2, ActiveConnection:=adoConnection, _
Options:=adCmdText

strSQLF2 is a string containing a stored procedure DisplayF2 with parameter strEmployee_Number. See below.

strSQLF2 = "EXECUTE DisplayF2 " & (strEmployee_Number)

When I try to edit the recordset and update I get the following error: "INSUFFICIENT KEY COLUMN INFORMATION FOR UPDATING OR REFRESHING"

Can anyone point me to where the problem might be????
I have used this same scenario to edit and update other tables but having this problem on a particular table. Could it be my stored procedure???? Stored procedure below:

DisplayF2
PARAMETERS [Employee_Number] IEEEDouble;
SELECT DEDNAME, BASSDEDS.DEDNO, DEPT, TYPE, AMOUNT, MTD_AMT, QTD_AMT, YTD_AMT, EMPNO
FROM BASSDEDS INNER JOIN BASSDDED ON BASSDEDS.DEDNO = BASSDDED.DEDNO
WHERE EMPNO = [Employee_Number];

Thank You for any help. TNN, Tom
TNPAYROLL@AOL.COM



TOM
 
Hi Robert,
Above procedure is right out of the schema for the datadbase.
Set adoRsFields = adoConnection.OpenSchema (adSchemaProcedures)

Do Until adoRsFields.EOF

Debug.Print adoRsFields!PROCEDURE_NAME
Debug.Print adoRsFields!PROCEDURE_DEFINITION & vbCrLf & vbCrLf
adoRsFields.MoveNext
Loop
TNN, Tom
TNPAYROLL@AOL.COM


TOM
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top