0
数据库错误我有一个传统的ASP应用程序,它连接到一个访问数据库,我收到以下错误,当我试图访问连接到数据库的页面:在传统的ASP应用
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 0x1b48 Thread 0x1970 DBC 0x1948024 Jet'.
/gasket.inc, line 24
这里是我的gasket.inc文件:
<%
'include file for gasket table database object
'Dimension variables
Dim adoConG 'Database Connection Variable
Dim strConG 'Holds the Database driver and the path and name of the database
Dim rsGasket 'Database Recordset Variable
Dim strAccessDBG 'Holds the Access Database Name
Dim strSQLG 'Database query sring
'Initialise the strAccessDB variable with the name of the Access Database
strAccessDBG = "\\MyServer\databases\gaskets\gaskets.mdb"
'Create a connection object
Set adoConG = Server.CreateObject("ADODB.Connection")
'Database connection info and driver
strConG = "DRIVER={Microsoft Access Driver (*.mdb)};uid=admin;pwd=; DBQ=" & strAccessDBG
'Set an active connection to the Connection object
'adoConG.Open "DSN=Gaskets"
adoConG.Open strConG
'Create a recordset object
Set rsGasket = Server.CreateObject("ADODB.Recordset")
%>
这是否管理员用户权限需要访问数据库?还是我错过了其他明显的东西?
问题是,数据库是在我的IIS的另一台服务器上,并且IUSR_是本地帐户不是吗? – CallumVass 2012-03-01 13:20:57
是 - IUSR位于机器本地。如果您正在访问远程访问数据库,那么您的连接字符串需要反映该计算机上可用的帐户。 – kpcrash 2012-03-01 13:25:52
那么,在我的例子中,这将是“管理员”?否则,我将如何在连接字符串中指定? – CallumVass 2012-03-01 13:28:19