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

ADO Oracle Connection with Data Environment problem

Status
Not open for further replies.

JKehoe

Programmer
Feb 8, 2001
17
0
0
US
Hello,

I'm having an odd problem. I have a program that uses an ADO connection to connect to an Oracle Database. I also have a data report in the project that sits on a data environment which also connects to Oracle. My connection string looks like this:

con.ConnectionString = "Provider=MSDAORA;" & _
"DATABASE=dbasename;" & _
"USER ID=user;" & _
"PASSWORD=pwd;" & _
"DATA SOURCE=dsname"


Using this type of connection runs fine on my machine and 90% of the machines it was distributed to. For some reason, I cannot connect on a few random machines. When they run the .exe, they receive an error that says: "Oracle error occured but description could not be retrieved from Oracle". As far as I can tell, all of the machines have loaded the software the same. Does anybody know of conflicting software (ahem, perhaps MS?) that could cause and ADO connection to fail on an Oracle table? Thanks!
 
I guess you have to have .dsn file on that computer to connect to database.

 
James - Yes, I can actually connect to the Oracle database just fine from other programs on the problem machines. The difference with this program is that it has a data report.

tp0724 - As a work-around, I did set up the DSNs on the problem machines and coded the program to use the DSN to connect. That brought a wealth of new problems. I have them all worked out accept for one, all fields that are of type number that are returned in my recordset get returned as zeroes. Varchars are returned just fine however. Because of these problems, I decided to attempt the "DSN-less" connection again. Does anyone know why all my numbers would be returned as zeros?

 
Is anyone else having this problem? I am having the same problem.

Thanks,

drost
 
Try running the latest MDAC setup on the problem PC. This will install the latest drivers. Also are you running the same ORACLE client versions on all machines?
 
Thanks for your reply, woyler. I have installed MDAC 2.6 and still get the same results. Also, I am running Oracle 8.1.5 on all machines.

Thanks,

drost
 
Try using the DSN but with oracles driver then try this
con.ConnectionString = "dsn=name;uid=uid;pwd=password"
 
I have narrowed this problem down some. I only have this problem when a specific control is on my form. When I use the Lead Tools Main control, I cannot connect. If I remove the control, I can connect without issues....

Strange, isn't it? Has anyone else ever had this issue??

mbpiper, thanks for the post. I've tried all kinds of connections with this thing and nothing helps. When I use a DSN, I just get "Run Time Error [" with no error description. I've also tried to connect via a Workspace, and also get errors.

Thanks for your help -

drost
 
I'm glad to see I'm not the only one with this problem. I still haven't been able to resolve it either. Anybody else have ideas?
 
Hey Guys,

I also have seen this same problem. I found a usenet post that talks about it. You can check it out here:
The usenet post points to Q264012 which solved the problem for me. The Q doesn't even have the error message we are getting: "Oracle error occurred, but error message could not be retrieved from Oracle." but it fixed the problem anyway. Go figure.
 
Thanks, psinpsycle,

I think we're on the right track...although I have added the registry setting, it still hasn't solved my problem.

Did you have to do anything else, or did it start to work immediately after the registry setting was entered?

Thanks,

drost
 
I just had get the right .reg file, then restart the app (word in my case) at first I thought it wasn't working.

I closed everything down to do a reboot, then thought to try it just before and it worked. This was an nt4/word2000 setup.

My current working theory is that it is a problem with the mdac installation. It seems that a different registry entry is needed depending on which version of oracle you have on your machine or which version you are trying to access. Then, it also has to be a different entry depending on your OS.

So, the theory is when you install mdac it sets it up for your current system. If you have oracle it gets that working, if you are on nt4 it sets it up for that. Then, if you install oracle it doesn't check the registry setting.. just leaves it. Then, you reinstall mdac but there is already something there so it doesn't even check, and you are stuck with the wrong/missing entry. Of course, the upgrade from nt4 to 2000 probably makes the same mistake...





good luck!
 
Hi,

I am having a wierd problem. I have a VB Application which uses RDO. The application has Oracle as back end. The application runs fine on all different Version combinations of MDAC, ORACLE ( like MDAC 2.5, 2.6, 2.7 and Oracle 8.1.5, 8.1.6, 8.1.7 etc) But the application hangs when run on a machine with MDAC 2.7 RTM and Oracle 8.0.5. ( When I go to the Windows Task Manager ir shows Not Responding for the application) can anyone tell me what the problem is? Thanks a Lot in advance!!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top