G
Guest
Dear all, here is my faulty code
Sub feed_table()
Dim conn As ADODB.Connection ' Connect to the database
Dim rst As ADODB.Recordset ' target recordset
Set conn = New ADODB.Connection
Set rst = New ADODB.Recordset
conn.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\Documents and
Settings\Administrateur\Mes documents\registered.MDB;"
rst.ActiveConnection = conn
rst.Source = "T_Etat_Civil" ' the table I would like to update
' I define the cursor type
rst.CursorType = adOpenDynamic
rst.Open ' I open the table
rst.AddNew "Nom", "Cadieu "
rst.AddNew "Prénom 1", "Toto Hervé"
rst.AddNew "Date de naissance", "24 / 7 / 1969"
rst.Close
conn.Close ' we close the connection
End Sub
unfortunately I get error message telling me error 3251 current recordset
does not support updating this may be a limitation of the provider or the
selected locked type..
who can help me to solve my issue ? (Id est write me the missing line(s) to
get it working) Thanks much in advance
best regards
Sub feed_table()
Dim conn As ADODB.Connection ' Connect to the database
Dim rst As ADODB.Recordset ' target recordset
Set conn = New ADODB.Connection
Set rst = New ADODB.Recordset
conn.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\Documents and
Settings\Administrateur\Mes documents\registered.MDB;"
rst.ActiveConnection = conn
rst.Source = "T_Etat_Civil" ' the table I would like to update
' I define the cursor type
rst.CursorType = adOpenDynamic
rst.Open ' I open the table
rst.AddNew "Nom", "Cadieu "
rst.AddNew "Prénom 1", "Toto Hervé"
rst.AddNew "Date de naissance", "24 / 7 / 1969"
rst.Close
conn.Close ' we close the connection
End Sub
unfortunately I get error message telling me error 3251 current recordset
does not support updating this may be a limitation of the provider or the
selected locked type..
who can help me to solve my issue ? (Id est write me the missing line(s) to
get it working) Thanks much in advance
best regards