Hi,
I've developed a webservice(ASP with COM+(VB6.0)) that has to support both SQL Server as Oracle. I've tested all functionality succesfull with SQL Server(TSQL). However when I try to connect with Oracle I get the following error(in Dutch):
The error in English: "Can't connect to transactionmanagement, or ..."Code:Error -2147168229 : 19-09-2005 15:00:18 - Description: GetConnection error: 'ORA; Provider=msdaora;Data Source=demo;User Id=demonl93;Password=demonl93; Kan geen verbinding maken met transactiebeheer, of transactiebeheer is niet beschikbaar.' - Line Number: 46![]()
The lines above are from a self-written log-function. Underneath the vbcode that retrieves the connectionstring from a user defined registrysetting.
VB Code:
Public Sub GetConnection(ByRef cnCon As ADODB.Connection) On Error GoTo GetConnection_ERR 'get database type and connection string from the registry. 10 strConnType = GetRegistrySetting("DBTYPE") 20 strConString = GetRegistrySetting("constring") 'ensure objCon holds a reference to a connection object If cnCon Is Nothing Then 30 Set cnCon = New ADODB.Connection End If With cnCon 40 .ConnectionString = strConString 42 .ConnectionTimeout = 10 44 .CursorLocation = adUseClient 46 .Open End With Exit Sub GetConnection_ERR: 'log the error logError Err.Number, "GetConnection error: '" & strConnType & "; " & strConString & "; " & Err.Description & "'", Erl() End Sub
VB Code:
Public Function GetRegistrySetting(ByVal strKeyValue As String) As String On Error GoTo GetRegistrySetting_ERR Dim lngKeyRoot As Long Dim strKeyName As String Dim lngRetVal As Long '// result of the API functions Dim lngKey As Long '// handle of opened key Dim vntValue As Variant '// setting of queried value 10 lngKeyRoot = HKEY_LOCAL_MACHINE 20 strKeyName = FMWEBSERVICE_REGISTRY_KEYNAME 30 lngRetVal = RegOpenKeyEx(lngKeyRoot, strKeyName, 0, KEY_READ, lngKey) 40 lngRetVal = QueryValueEx(lngKey, strKeyValue, vntValue) 50 RegCloseKey (lngKey) 60 GetRegistrySetting = vntValue Exit Function GetRegistrySetting_ERR: 'log the error logError Err.Number, "GetRegistrySetting: '" & Err.Description & "'", Erl() End Function
This is how the registry settings look like:
Constring: Provider=msdaora;Data Source=demo;User Id=demonl93;Password=demonl93
Dbtype: ORA
Hopefully someone can help me?![]()
Tnx!![]()


Reply With Quote
