1
我在連接到另一臺服務器上的數據庫時遇到問題。我已經在測試中設置了完美的DSN。然而,隨着follwing代碼運行ASP腳本時:來自網絡上另一臺服務器的SQL SERVER連接
<%
Dim rsGetInvoiceContact
Dim rsGetInvoiceContact_numRows
Set rsGetInvoiceContact = Server.CreateObject("ADODB.Recordset")
rsGetInvoiceContact.ActiveConnection = MM_conn_to_EFACs_STRING_ap
rsGetInvoiceContact.Source = "SELECT * from "& ActinicPersons &" p WHERE p.[Contact ID] = " + Replace(rsGetInvoiceContact__vInvoiceID, "'", "''") + ""
rsGetInvoiceContact.CursorType = 0
rsGetInvoiceContact.CursorLocation = 2
rsGetInvoiceContact.LockType = 1
rsGetInvoiceContact.Open()
rsGetInvoiceContact_numRows = 0
%>
隨着下面的連接字符串:
Dim MM_conn_to_EFACs_STRING_ap
MM_conn_to_EFACs_STRING_ap = "dsn=DSNefacsdb2;uid=IUSR_RFS01;pwd=Splendid01;"
腳本運行後錯誤顯示:
[Microsoft][ODBC SQL Server Driver][SQL Server]OLE DB provider 'MSDASQL' reported an error. The provider did not give any information about the error.
/Sales/order_entry.asp, line 55
運行腳本時針對本地數據庫,它按照我的要求工作,我已經調整了用戶IUSR_RFS01的其他數據庫的所有權限,但仍然沒有快樂! :(
感謝您的答覆。我目前使用管理員帳戶布萊恩服務器,我會提出,在連接字符串?目前端口似乎都是允許的。允許遠程桌面。 – user1471646 2012-07-19 13:45:02
嘗試使用sa acco不要看你是否可以訪問數據庫。 – webb 2012-07-19 14:17:22
沒有sa賬戶的快樂,有沒有其他想法? – user1471646 2012-07-20 08:14:59