-
This is driving me NUTS. I HATE ADO!! Can somebody please tell me why I keep getting an error saying "Insufficient base bloody information for updating and friggin' refreshing this hell hole recordset"
Dim adoUserLog As Recordset
Dim db As Connection
Set db = New Connection
With db
.CursorLocation = adUseClient
.ConnectionString = "Provider=Microsoft.Jet.OLEDB.3.51;Persist Security Info=False;Data Source=" & CurrentDir & "Data\Driving.mdb;Jet OLEDB :Database Password=MyPassword;"
.Open
End With
Set adoUserLog = New Recordset
adoUserLog.Open "SELECT * FROM [User Log];", db, adOpenStatic, adLockOptimistic
With adoUserLog
.AddNew
.Fields("UserID").Value = CurrentUserID
.Fields("Description").Value = Activity
.Fields("LogDate").Value = Format(Date, "dd/MM/yyyy")
.Fields("LogTime").Value = Format(Time, "hh:nn:ss")
.Update
End With
I'm at a complete loss, I see nothing wrong and I'm on the verge of pumping this computer full o'lead
Please HELP and keep me sane!
A thousand thank you's
Many regards,
------------------
- Chris
[email protected]
If it ain't broke - don't fix it :)
[This message has been edited by chrisjk (edited 02-06-2000).]
-
When you specify UseClient Side Cursor Location, you're telling it to use a different set of Drivers, which it can't find or don't work, remove that line and you should be fine, ie.
Code:
Private Sub Command1_Click()
Dim adoUserLog As New ADODB.Recordset
Dim db As New ADODB.Connection
db.Open "Provider=Microsoft.Jet.OLEDB.3.51;Persist Security Info=False;Data Source=C:\Driving.mdb;"
adoUserLog.Open "SELECT * FROM [User Log];", db, adOpenStatic, adLockOptimistic
With adoUserLog
.AddNew
.Fields("UserID").Value = CurrentUserID
.Fields("Description").Value = Activity
.Fields("LogDate").Value = Format(Date, "dd/MM/yyyy")
.Fields("LogTime").Value = Format(Time, "hh:nn:ss")
.Update
End With
End Sub
------------------
Aaron Young
Analyst Programmer
[email protected]
[email protected]
-
Would you believe I've been tearing my hair out over 1 line!!! It was in every example of ADO though... :confused:
Anyway, thanks Aaron. Now I can sleep.