ADO connection to an mdb database fails

ADO connection to an mdb database fails

Question:
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.

Answer:
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:
XDR solutions

The Benefits of Using XDR Solutions

Cybercriminals constantly adapt their strategies, developing newer, more powerful, and intelligent ways to attack your network. Since security professionals must innovate as well, more conventional endpoint detection solutions have evolved

AI is revolutionizing fraud detection

How AI is Revolutionizing Fraud Detection

Artificial intelligence – commonly known as AI – means a form of technology with multiple uses. As a result, it has become extremely valuable to a number of businesses across

AI innovation

Companies Leading AI Innovation in 2023

Artificial intelligence (AI) has been transforming industries and revolutionizing business operations. AI’s potential to enhance efficiency and productivity has become crucial to many businesses. As we move into 2023, several

data fivetran pricing

Fivetran Pricing Explained

One of the biggest trends of the 21st century is the massive surge in analytics. Analytics is the process of utilizing data to drive future decision-making. With so much of

kubernetes logging

Kubernetes Logging: What You Need to Know

Kubernetes from Google is one of the most popular open-source and free container management solutions made to make managing and deploying applications easier. It has a solid architecture that makes

ransomware cyber attack

Why Is Ransomware Such a Major Threat?

One of the most significant cyber threats faced by modern organizations is a ransomware attack. Ransomware attacks have grown in both sophistication and frequency over the past few years, forcing

data dictionary

Tools You Need to Make a Data Dictionary

Data dictionaries are crucial for organizations of all sizes that deal with large amounts of data. they are centralized repositories of all the data in organizations, including metadata such as