Bad arguments when opening SQL table for ADD

D

Dennis

I'm trying to add a record to a SQL server table. I'm using the following code:

Set recSet3 = New ADODB.Recordset
recSet3.CursorLocation = adUseServer
recSet3.CursorType = adOpenKeyset
recSet3.LockType = adLockOptimistic
recSet3.Open "dbo_t_phone_number", dbConn, , , adCmdTable

where dbConn is:

Dim dbConn As Object
Set dbConn = Application.DBEngine(0)(0)

When I attempt to execute the "recset3.Open" command, I'm getting the
following error and don't know why:

"Arguments are of the wrong type, are out of acceptible range, or are in
conflict with one another"

Any insight on this would be MOST appreciated. Note that I'm running Access
2002, and DO NOT issue an explicit database OPEN command.

Thanks a million!
 
G

George Nicholson

DBEngine(0)(0) is a DAO object and you are trying to use it as an ADO
connection, hence: "wrong type".

HTH,
 
Top