Do you have a question? Post it now! No Registration Necessary. Now with pictures!
- Posted on
- Recordsets that can be edited (MySQL ODBC)
June 11, 2005, 12:54 am
rate this thread
ODBC that can be edited? The following code only returns a recordset that
cannot be edited
Private Sub Form_Open(Cancel As Integer)
Dim cn As ADODB.Connection
Dim rs As ADODB.Recordset
Set cn = New ADODB.Connection
.Provider = "MSDASQL.1"
.Properties("Persist Security Info").Value = "False"
.Properties("Data Source").Value = "MyDatabase"
Set rs = New ADODB.Recordset
Set .ActiveConnection = cn
.Source = "SELECT * FROM inventory"
.LockType = adLockOptimistic
.CursorType = adOpenStatic
.CursorLocation = adUseClient
Set Me.Recordset = rs
Set rs = Nothing
Set cn = Nothing
Re: Recordsets that can be edited (MySQL ODBC)
rs.CursorType = adOpenDynamic
OR (maybe! I don't use ADO much.)
rs.CursorType = adOpenKeyset
You can't use the adOpenForwardOnly cursor type if you want to write to the
Incidentally - your 2 way R/W recordset is bound to be slower. I would open
up a separate write channel myself.
- » Americanas.com SALDO de TVs Com at 80% de Desconto (29798)
- — Newest thread in » MySQL Database Forum