Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

ADODB.Recordset error '800a0bb9'

Status
Not open for further replies.

rwies

IS-IT--Management
Jun 8, 2003
41
US
I have used Access for several years but am new to using ODBC. I have a .asp web page that was written for me that is supposed to read from an Access database. It worked fine on the authors server but I can’t get to work correctly on my server.

My server is a Windows 2000 server. I have tried all of the various drivers to set up a system DSN.

The error message I am getting is:
ADODB.Recordset error '800a0bb9'
Arguments are of the wrong type, are out of acceptable range, or are in conflict with one another.
/owners_members.asp, line 69

The code in line 69 of the .asp file is:

objrs.open strSQL, objconn, adopenstatic, adlockreadonly

strsql is previously defided as “SELECT * FROM [Active Co’s]”
obconn is previously defined as the ODBC name

I have no idea as to how to test the ODBC, all I have been doing is trying different ways to set up the DSN. Any help is appreciated.

Ron Wies
 
objConn should be an ADO connection object that uses the ODBC to connect to the database. How is this ADO connection object opened?

zemp
 
Is there really an apostrophe in the table name?!! I can't help but think that that would cause this problem.
 
Zemp:

The code in the .asp file that creates the connection is:

'Create the connection
Set objConn = Server.CreateObject("ADODB.Connection")
objConn.Open "MonitoringAmerica"

'Define the SQL statement
strSQL = "SELECT * FROM [Active Co's]"

'Create recordset and retrieve values using command object
Set objRS = Server.CreateObject("ADODB.Recordset")
objRS.Open strSQL, objConn, adOpenStatic, adLockReadOnly

This same code originally existed on another server and worked fine. I can't manage to get it to work on my server. I appreciate any help you can provide.

GhostWolf:

Yes, the apostrophe does exist in the table name. This code was set up on another server and it worked fine. I don't think the apostrophe has anything to do with the problem. Thanks for taking the time to reply.

Ron--
 
What exactly is "MonitoringAmerica", the DB?

There just doesn't seem to be enough info in the connection string. Can you make an ODBC connection to the DB? If so try to open the connection with
Code:
objConn.Open "DSN=myodbc"
or similar code (not 100% with asp syntax.

What version of mdac do you have installed? is it different from the 'other' server.

zemp
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top