我試圖從VB 6.0應用程序(連接到SQL 2000)執行數據庫操作。該應用程序在我的本地和測試機器上運行良好,但在UAT環境中出現以下錯誤。ADODB連接問題
dbConn - Nothing
lErrorNum = -2147024770
sErrorDesc = Method '~' of object '~' failed
我的源代碼是:
Dim connectionString As String
connectionString = "DSN = {My DSN Name}"
Private dbConn As ADODB.Connection
Set dbConn = New ADODB.Connection
With dbConn
.ConnectionString = sConn
.ConnectionTimeout = 10
.CursorLocation = adUseClient
.CommandTimeout = 60
.Open
End With
的MDAC版本是MDAC 2.8 SP2的Windows Server 2003 SP1。 (Check with CompChecker)
我已將源代碼複製到UAT環境,並嘗試從IDE運行它,但仍然出現相同的錯誤。
請定義「UAT」? – AnthonyWJones 2009-10-14 06:44:36
UAT =用戶驗收測試 – AngryHacker 2009-10-15 02:14:10