Runtime Error 3146

amirbilal

New member
Local time
Today, 03:52
Joined
Dec 14, 2005
Messages
9
Runtime Error 3146
ODBC -- call failed

this is the error I get when executing the following code.

Dim db As DAO.Database
Set db = DBEngine(0)(0)
Dim strSQL As String
strSQL = "select TOP 1 * from dbo_Logins where ContactID=" & c_id
Dim rs As DAO.Recordset
Set rs = db.OpenRecordset(strSQL, dbOpenDynaset, dbSeeChanges)

error is encountered on the last line where it opens a recordset.

I am using SQL2000 as backend database....

any help would be much appriciated.
 
I would like to add one more thing in it is that. When I use SQL 2005 it works fine but it fails only in case of SQL 2000.
 

Users who are viewing this thread

Back
Top Bottom