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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

ACCESS2000 Connection

Status
Not open for further replies.

m3hosting

MIS
May 10, 2001
8
US
I am using Visual InterDev and access97/access2000. I have the following database connection I add to all .asp pages via an include. I want to switch to 2000 and have problem with connection.

<%Dim objConn 'declare your variable to hold your connection
Set objConn = Server.CreateObject(&quot;ADODB.Connection&quot;)
objConn.ConnectionString=&quot;DRIVER={Microsoft Access Driver (*.mdb)};&quot; & &quot;DBQ=F:\ Support.mdb&quot;
objConn.open
%>

This works great for ACCESS97. Can anyone let me know how to create the same type of DSNless connection and be able to connect to an ACCESS2000 database.

Thanks in advance

Mark
 
Hi Mark,

Presuming WWCASSupport.mdb is an Access2000 database and you desire to unnecessarily continue to use ODBC, there will be no difference in the connection string. Is this throwing an error?

Try reading the following:
FILE: MDACCON.EXE Using Connection Strings with ODBC/OLEDB/ADO/RDS
Jon Hawkins
 
Yes it gives and unknown database error when trying to access it.
 
First, veryify you've conformed to the configuration presented in:
HOWTO: Connect to a Remote Access Database from Active Server Pages

Next, ensure you have Jet 4.0 installed on the server where the scripts run. You can do so by checking the registry for the presence of the following key:
HKEY_LOCAL_MACHINE\Software\Microsoft\Jet\4.0

or run the following script:
set oShell = Server.CreateObject(&quot;Wscript.Shell&quot;)
cKey=&quot;HKLM\Software\Microsoft\Jet\4.0\Engines\SystemDB&quot;
cVal=oShell.RegRead(cKey)
IF cVal<>&quot;&quot; Then
Response.Write &quot;Present and Accounted For&quot;
ELSE
Response.Write &quot;Jet 4.0 Not Present&quot;
END IF

Last, try reading:
PRB: Error &quot;Cannot Open File Unknown&quot; Using Access

Jon Hawkins
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top