Groups | Blog | Home
all groups > sql server clients > april 2006 >

sql server clients : ADP bound to a Disconnected Recordset can not update.


KevinWB
4/17/2006 1:31:11 PM
I have a form that I want to have use a disconnected recordset. The
disconnected recordset works fine, but I am unable to update or even type in
the textboxes. When I try I get a "Recordset is not updateable message"

My intention is to have the recordset reconnected and for it to do a batch
update when the client pushes the "Save" button.

I know I could have the text boxes unbound, load the values from the
disconnected recordset, then disconnect. And reconnect and load the values
back in to the recordset to save, but them seems to be a lot of extra work.

Below is the code I'm using to load my recordset. Does anyone have any ideas
on where I'm going wrong?
'*****************************
Private Sub UpdateRecordSource_New()

Dim cnn As New ADODB.Connection
Dim cmd As New ADODB.Command
Dim rst As New ADODB.Recordset

On Error GoTo ErrHandler:

cnn.Open GetStrConnect
rst.CursorLocation = adUseClient

rst.CursorType = adOpenStatic
rst.LockType = adLockBatchOptimistic
Set cmd.ActiveConnection = cnn

cmd.CommandText = "rs_Students_version_8"
cmd.CommandType = adCmdStoredProc
cmd.Parameters.Refresh
cmd.Parameters("@iIntakeID") = 3304
rst.Open cmd

Set Me.Recordset = rst

rst.Close
cnn.Close

Set rst = Nothing
Set cnn = Nothing
Set cmd = Nothing
Exit Sub
ErrHandler:
MsgBox Err.Description
Resume Next
End Sub
--
Sue Hoegemeier
4/17/2006 8:56:57 PM
Probably better to post this in one of the Access
newsgroups. Try either -
microsoft.public.access.formscoding
microsoft.public.access.adp.sqlserver

-Sue

On Mon, 17 Apr 2006 13:31:11 -0700, KevinWB
[quoted text, click to view]
AddThis Social Bookmark Button