Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

VB 6.0 connection string to Oracle 9.0 not working

Status
Not open for further replies.

sandra64

Programmer
Jun 26, 2002
28
GB
Dear all

I have a vb connection string in my program which has been connecting to oracle 8.0 successfuly for months. Oracle has now been upgraded to oracale 9.0 and the connection string won't work. The DSN works successfully but when run through the program I get the following message:-


-2147467259 specified driver could not be loaded due to system error 5 (Oracle in OraHome92).

The connection string is as follows:-

.ConnectionString = "Oracle;DATABASE=;DSN=;UID=;Password=;"


I don't know whether it's anything to do with the install of oracle (this was done by someone else). I can't see it being that as the DSN test works.

would appreciate some help please. cheers Sandra
 
In an empty VB project add a ADODC data control and try and set it up to connect to Oracle.
then look at the connection string and see if it is anything different than what you have.


Regards

Frederico Fonseca
SysSoft Integrated Ltd
 
Oracle often creates problems for connections. If Oracle has indeed been upgraded, you may need to upgrade your ODBC drivers as well. I have even had to resort to purchasing 3rd party drivers for Oracle.
 
A quick way a creating a connectino string (just in case you typed it in wrong!) is to create a text file, paste in

Code:
Dim objDataLinks, strRetVal
Set objDataLinks = CreateObject("DataLinks")
On Error Resume Next ' ignore cancel
strRetVal = objDataLinks.PromptNew
On Error Goto 0
If Not IsEmpty(strRetVal) Then
InputBox "Your Connection String is listed below.", _
         "OLE DB Connection String", strRetVal
End If
Set objDataLinks = Nothing

and save the file as providerstring.vbs or something like that. You can then set your connection string and copy out the results!

It may not be the cause of your problem but it does come in handy sometimes :)

----------------------------------------------------------------------

Need help finding an answer?

Try the search facilty ( or read FAQ222-2244 on how to get better results.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top