Does anyone know how to create a recordset using MS Access 2003, ADO & MySQL
ODBC that can be edited? The following code only returns a recordset that
cannot be edited
Private Sub Form_Open(Cance l As Integer)
Dim cn As ADODB.Connectio n
Dim rs As ADODB.Recordset
Set cn = New ADODB.Connectio n
With cn
.Provider = "MSDASQL.1"
.Properties("Pe rsist Security Info").Value = "False"
.Properties("Da ta Source").Value = "MyDatabase "
.Open
End With
Set rs = New ADODB.Recordset
With rs
Set .ActiveConnecti on = cn
.Source = "SELECT * FROM inventory"
.LockType = adLockOptimisti c
.CursorType = adOpenStatic
.CursorLocation = adUseClient
.Open
End With
Set Me.Recordset = rs
Set rs = Nothing
Set cn = Nothing
End Sub
ODBC that can be edited? The following code only returns a recordset that
cannot be edited
Private Sub Form_Open(Cance l As Integer)
Dim cn As ADODB.Connectio n
Dim rs As ADODB.Recordset
Set cn = New ADODB.Connectio n
With cn
.Provider = "MSDASQL.1"
.Properties("Pe rsist Security Info").Value = "False"
.Properties("Da ta Source").Value = "MyDatabase "
.Open
End With
Set rs = New ADODB.Recordset
With rs
Set .ActiveConnecti on = cn
.Source = "SELECT * FROM inventory"
.LockType = adLockOptimisti c
.CursorType = adOpenStatic
.CursorLocation = adUseClient
.Open
End With
Set Me.Recordset = rs
Set rs = Nothing
Set cn = Nothing
End Sub
Comment