Browse DevX
Sign up for e-mail newsletters from DevX

Tip of the Day
Language: Active Server Pages (ASP)
Expertise: Beginner
Jun 10, 1999



Building the Right Environment to Support AI, Machine Learning and Deep Learning

ADO connection to an mdb database fails

Summary of the problem: Connecting directly to a Microsoft Access database from a Web project developed in Interdev 6.0 fails unless I modify every .Open to use a connection string constructed on the spot [as opposed to .Open Application('Blah_ConnectionString') ... ]

For example: Using the Gallery sample provided and built by InterDev 6.0 produces a connection string in Global.asa as follows:

Application("Gallery_ConnectionString") = "DBQ=\\myserver\www$\Gallery.mdb;DefaultDir=\\myserver \www$\;Driver={Microsoft Access Driver 
Threads=3;UID=admin;UserCommitSync=Yes;;User Id=admin;"
Yet all attempts to use the connection from ADO components such as within ADO Recordset produce the following error:
ADODB.Connection error '800a0bb9' 

The application is using arguments that are of the wrong type, are out of acceptable range, or are in conflict with one another. 

/Gallery/DEntry/Entry.asp, line 188
Line 188 in Entry.asp actually points to the line before the .Open. However, the nature of the error message and past fixes where I corrected the error by modifying the .Open implies that the statement containing .Open is the problem. Here are lines 188 and 189:
188> DBConn.CursorLocation = Application('Gallery_CursorLocation');
189> DBConn.Open(Application('Gallery_ConnectionString'), Application('Gallery_RuntimeUserName'), Application('Gallery_RuntimePassword'));
The implications of this problem are that the scope of the Application object established within Global.asa is not in fact global to the project. Which implies that the Web server has been incorrectly configured? This is my current working hypothesis.

Perhaps this is a dumb observation, but if you have actually pasted your problem lines 188 and 189 from your actual code, then I notice that you are using a single quote in your code. That's the comment character in VBScript and may be the cause of your problems:

188> DBConn.CursorLocation = Application('Gallery_CursorLocation');
I would explore that first.
DevX Pro
Comment and Contribute






(Maximum characters: 1200). You have 1200 characters left.



Thanks for your registration, follow us on our social networks to keep up-to-date