i have a stored procedure, that loads perfect in visual basic except i cannot edit the records.
in microsoft access i can, when i run the stored procedure.
what possible solutions could get around this? as i need to get the fields from different tables
Dim Cmd As New ADODB.Command
Dim cmdtxt As String
Set Cmd.ActiveConnection = frm_main.db
Cmd.CommandText = "Rollcall"
Cmd.CommandType = adCmdStoredProc
Cmd.Parameters.Append Cmd.CreateParameter("[@Rollid]", adVariant, adParamInput, 2)
Cmd.Parameters(0).Value = rollsid
Set adoPrimaryRS = New ADODB.Recordset
adoPrimaryRS.Open Cmd, , adOpenDynamic, adLockOptimistic
Set DataGrid1.DataSource = adoPrimaryRS
when i try to edit a record it comes up with a runtime saying
Insufficient key column information for updating or refreshing.
i need help asap,
thankyou in advance. james
it is dynamic because i can edit it. the problem was that access didnt know where to write back the record. since i was only interested in editing one field out of all the returned rows i only needed the id of that table to be there too
i had a table rollitem, with the record 'mark'
another one student, with 'first name' and 'last name'
the sp returned all of those fields, while only mark was ment to be edited.
i fixed it by adding rollitems primary key to the sp, then access knew where to edit.