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=\myserverwww$Gallery.mdb;DefaultDir=\myserver www$;Driver={Microsoft Access Driver (*.mdb)};DriverId=25;FIL=MS Access;ImplicitCommitSync=Yes;MaxBufferSize=512;MaxScanRows=8;PageTimeout=5;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.

Share the Post:
Share on facebook
Share on twitter
Share on linkedin


The Latest

microsoft careers

Top Careers at Microsoft

Microsoft has gained its position as one of the top companies in the world, and Microsoft careers are flourishing. This multinational company is efficiently developing popular software and computers with other consumer electronics. It is a dream come true for so many people to acquire a high paid, high-prestige job

your company's audio

4 Areas of Your Company Where Your Audio Really Matters

Your company probably relies on audio more than you realize. Whether you’re creating a spoken text message to a colleague or giving a speech, you want your audio to shine. Otherwise, you could cause avoidable friction points and potentially hurt your brand reputation. For example, let’s say you create a

chrome os developer mode

How to Turn on Chrome OS Developer Mode

Google’s Chrome OS is a popular operating system that is widely used on Chromebooks and other devices. While it is designed to be simple and user-friendly, there are times when users may want to access additional features and functionality. One way to do this is by turning on Chrome OS