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