I am trying to find the ID and then populate the database with a new record with the next available ID in an access Database.
Though the code I am using errors
Any ideas?
Though the code I am using errors
VB.NET:
If sConn.State <> ConnectionState.Open Then
sConn.Open()
End If
eDA0.SelectCommand = New OleDbCommand("Select * from audit", sConn)
eCB0 = New OleDb.OleDbCommandBuilder(eDA0)
eDA0.MissingSchemaAction = MissingSchemaAction.AddWithKey
eDA0.Fill(eDS0, "audit")
eDR0 = eDS0.Tables("audit_id").NewRow()
eDR0("user_id") = sUserNumber
eDR0("module_name") = "Inventio CRM"
eDR0("item_summary") = "User Logon"
eDR0("date_modified") = Date.Now
eDS0.Tables("audit").Rows.Add(eDR0)
eDR0 = Nothing
eDS0.Dispose()
eDA0.Dispose()
sConn.Close()
Any ideas?
Last edited by a moderator: