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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Oracle connection string not working on new machine

Status
Not open for further replies.

JaxtheDog

Programmer
Oct 3, 2002
37
US
Hello,
I hope someone can help with this --its driving me crazy!!

My trusty old machine crashed and I have a new XP professional which is so far a lot less than trusty. I have installed VB6 and a local Oracle database. When I run my VB app, it fails on the opening connectionstring with the message: Method 'Open' of object '_connection' failed

I am connecting using the following:

Global gl_cnn As ADODB.Connection
Set gl_cnn = New ADODB.Connection

gl_cnn.ConnectionString = "Provider=MSDAORA;" & _
"Data Source=" & sDataSource & ";" & _
"user ID=" & sUserID & ";" & _
"password=" & sPassword

gl_cnn.Open This is where it fails.

I know that the references in the project are correct(or at least that thye are the same as they were on the old machine), and that the Oracle data base works since I can access it with SQL*Plus and Toad. I have also tried other connection string options found on this forum and at avarious web sites with nthe same error message result.

My only guess is that something is missing in my installation of the OS or of VB or in the registry. I have verified that Microsoft ODBC for Oracle driver is installed (if it matters, its date, 08/29/2002, is earlier than that on my other machine).

If anyone can suggest why the open method fails in my connection, or point me to other troubleshooting options, I'd really appreciate it! Thanks!
 
Hey, not entirely sure what the problem is, do you have the actual error? Also, you may consider just creating a DSN...I find them rather helpful. Either way, if you could get the actual oracle error (or the system error, if its a VB problem) and post it, we may be able to help more.

Good luck

Kevin

- "The truth hurts, maybe not as much as jumping on a bicycle with no seat, but it hurts.
 
Kevin,
Thanks for responding.

I think that this is a VB error, possibly related to installation on the new XP machine, not an Oracle error. OR it's an Active X error.

The message I am getting tells me that the method (open) of the object (_conection) failed. That is different than not getting the conection because the database is not available or the password/user ID is bad--I have an error trap for that and on my old machine, if it could not open the database it took that path.

_connection is also not the object instance I created--gl_cnn is.

I did try your suggestion of creating a DSN (file, system, and user--one at a time) and I got exactly the same results each time.

I'd appreciate any other suggestions anyone might have.

Thanks,
Jax


 
hmm....are you running the same service packs for windows and VB 6 as you had on your old box? You can check in the refrences and see if any of them have a comment that say that it is an invalid reference or that the reference is missing....I've had that problem before, though it doesn't really seem that this is your problem, but its worth a shot.

Good luck,
Kevin

- "The truth hurts, maybe not as much as jumping on a bicycle with no seat, but it hurts.
 
Did you install the Oracle client on the new machine? The ADO classes need it for it's OCI network library.

Chip H.


____________________________________________________________________
If you want to get the best response to a question, please read FAQ222-2244 first
 
Thanks for the questons--I'm still stuck. I installed the same VB and Oracle that I had on the old machine although it is a diffeent (newer) version of XP. I do not have any missing or invalid references when I check the project. I have personal Oracle 9i on the machine, and the database I am accessing is local, so I'm not sure that Oracle client is required--am I wrong in this assumption?

I appreciate any suggestions for other checks that anyone has.

Thanks,
Jax
 
Just to tie out this thread- I have figured out the problem. Somehow, out of the box or during re-installation of software, the file MSDART.DLL got broken. It was also an older version. I installed an updated version into the system32 subdirectory and all problems went away. I found it by looking at DLLs one at a time to see if there was a different date, size, etc.

That is why the error was fatal, and why Method 'Open' of object '_connection' failed --the ADO runtime routines in MSDART were not available to VB at runtime.

How's that for frustration!!!

Thanks to all who looked at this for me--I appreaciate knwing there is help.

Jax
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top