setting the recordset in code

  • Thread starter Thread starter Jake
  • Start date Start date
J

Jake

I am trying to set a recordset programtically referring to a remote SQL server.

I have been sucessfull in setting the recordset but it does not apear to be
updatable. Is it posible to make a dynamic recordset that is updatable?

I am using the method descibed in the Access VBA help files which looks like
this:

Global rstSuppliers As ADODB.Recordset
Sub MakeRW()
DoCmd.OpenForm "Suppliers"
Set rstSuppliers = New ADODB.Recordset
rstSuppliers.CursorLocation = adUseClient
rstSuppliers.Open "Select * From Suppliers", _
CurrentProject.Connection, adOpenKeyset, adLockOptimistic
Set Forms("Suppliers").Recordset = rstSuppliers
End Sub

I have experemented with different cursorlocation and cursortype settings
with no success.
 
Are you sure the table has a unique index? Without a key a table becomes
'not' updatetable...
 
Back
Top