我收到了一條ORA-03106錯誤訪問Oracle數據庫,當我嘗試訪問使用MS ADO數據庫。此問題只發生在Windows 7 64位機器上。顯然過去有一些XP的問題,但它們是通過一些註冊表編輯修復的。這些註冊表編輯在應用於Windows 7機器時沒有做任何事情。錯誤ORA-03106使用VB6在Windows 7 64位
我沒有關於數據庫的大量信息,因爲這是由不同的部門來處理,我是一個實習生,剛扔在我非常小的背景信息這個問題。這裏是代碼,我得到MyConnection.Open行上的錯誤。
Function db_fetch(sIButtonID, ByRef lstatus, sdescr) As tIBRec
Dim myRecordSet As ADODB.Recordset
'Dim sConnectString As String
Dim sSQL_Statement As String
Dim this_ibutton As tIBRec
Set myRecordSet = New ADODB.Recordset
If Not CheckForNetDrive("O:") Then
lstatus = Shell("net use O: \\host\oracle /PERSISTENT:YES")
If Not CheckForNetDrive("O:") Then lstatus = MapNetworkDrive("O:", "\\host\oracle")
If lstatus = 0 Then
If InStr(GetEnvironmentVar("PATH"), "orawin95\bin") = 0 Then
lstatus = SetEnvironmentVariable("PATH", GetEnvironmentVar("PATH") & ";O:\orawin95\bin")
End If
End If
Else
If InStr(GetEnvironmentVar("PATH"), "orawin95\bin") = 0 Then
lstatus = SetEnvironmentVariable("PATH", GetEnvironmentVar("PATH") & ";O:\orawin95\bin")
End If
End If
'sConnectString = "Provider=msdaora;Data Source=(DESCRIPTION=(SOURCE_ROUTE=OFF)(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=host)(PORT=1521)))(CONNECT_DATA=(SID=12)(SERVER=DEDICATED)));User Id=username;Password=password;"
'sConnectString = "Provider=msdaora;Data Source=(DESCRIPTION=(SOURCE_ROUTE=OFF)(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=host)(PORT=1521)))(CONNECT_DATA=(SID=03)(SERVER=DEDICATED)));User Id=username;Password=password;"
'sConnectString = "Provider=msdaora;Data Source =(DESCRIPTION=(SOURCE_ROUTE=OFF)(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=host)(PORT=1521)))(CONNECT_DATA=(SID=03)(SERVER=DEDICATED)))User Id=username;Password=password;"
'On Error GoTo err:
If myConnection.State = 0 Then
myConnection.Mode = adModeReadWrite
myConnection.Open sConnectString
End If
歡迎來到StackOverflow。發送代碼包括用戶名,密碼和主機不太聰明。這些事情是保密的,所以我建議下次不要。 –
感謝您的支持。 – user3232337
你怎麼能得到VB6使用ADO.NET?那麼,我的一個項目就是研究將我們的程序從VB6遷移到.NET(全部200,000行代碼)的必要條件。 – user3232337