Web Hosting Talk







View Full Version : Database connection problem


andy18
11-08-2002, 04:09 PM
Hi,

when I try to connect to my database ,I got the following error message :

Microsoft OLE DB Provider for ODBC Drivers error '80004005'

[Microsoft][ODBC Microsoft Access Driver]General error Unable to open registry key 'Temporary (volatile) Jet DSN for process 0xb40 Thread 0x1d28 DBC 0x928f57c Jet'.

Below is the sample coding :

File A :
======

<%
' FileName="Connection_ado_conn_string.htm"
' Type="ADO"
' HTTP="false"
' Catalog=""
' Schema=""
MM_conn3mc_STRING = "Driver={Microsoft Access Driver (*.mdb)};DBQ=C:\webspace\aaa\aaa.com\db\"
%>

File B:
=====

<%@LANGUAGE="VBSCRIPT"%>
<!--#include file="../Connections/conn3mc.asp" -->
<%
Dim preciodom__MMColParam
preciodom__MMColParam = "rd-001"
if (Request("MM_EmptyValue") <> "") then preciodom__MMColParam = Request("MM_EmptyValue")
%>
<%
set preciodom = Server.CreateObject("ADODB.Recordset")
preciodom.ActiveConnection = MM_conn3mc_STRING




Any comments?



Andy

andy18
11-08-2002, 07:30 PM
Hello,

Able to solve it by adding the database name at the end of the File A.

File A :
======

<%
' FileName="Connection_ado_conn_string.htm"
' Type="ADO"
' HTTP="false"
' Catalog=""
' Schema=""
MM_conn3mc_STRING = "Driver={Microsoft Access Driver (*.mdb)};DBQ=C:\webspace\aaa\aaa.com\db\aaa.mdb "
%>

:stickout:





Andy