Form with Disconnected Recordset, Will not allow edits.

G

Guest

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 that 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
 
V

Vadim Rapp

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

You are absolutely right. Access native binding does not support
disconnected recordsets, therefore, you have to do everything on your own.
The only thing to do would be writing to Microsoft and telling them that
making new skins and animations is not the only possible way of Office
evolution; that would give 0.001% of hope.

Vadim Rapp
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top