ORacleConnection problem

  • Thread starter Thread starter Raphaël ARBUZ
  • Start date Start date
R

Raphaël ARBUZ

Hi everybody

I have tried to create a Windows Application with an Oracle Connection to a
base, but each time the program comes to my line :
Connection1.Open();
it generates an exception.in 'system.data.oracleclient.dll' with for only
information : "system error"

The fact is when I do exactly the same in an asp.net webform, it works and
doesn't come to any exception !

Does someone has an idea of what to do ?

Thank you so much

Raphael
 
There could be a few different things at play here. In order to same some
time tracking them down, in either this project or a dummy one, drag an
Oracleconnection from the Data Tab of your toolbox. In the Properties Grid,
click on the ConnectionString property. When the configuration wizard comes
up, fill in the respective parts and at the end, select Test Connection. If
you can connect than the most likely problem is your connection string.
It's possible for instance that the account you are connecting from on the
web server, like the aspnet account have permissions whereas yours may not.
Or you could have typed something incorrectly in the username or passsword.

Anyway, if you can't connect from there, you may need updated data access
components or it's possible something is wrong with your install or that it
got corrupted and you may need to reinstall it. Before you go through any
of that though, check the easy stuff.

Let me know and we'll take it from there.

Bill

--
W.G. Ryan MVP Windows - Embedded

http://forums.devbuzz.com
http://www.knowdotnet.com/dataaccess.html
http://www.msmvps.com/williamryan/
 
Thanks a lot for your message. Unfortunately, it didn't give me a
solution to my issue. My connection string is OK, and everything is, to
my mind, supposed to work correctly. If it was an installation problem,
I would have the same problem when using OracleConnections in an asp
WebForm, don't you thing so ? So I absolutely can't figure out what the
problem is.

If you have any other idea...

Anyway thank you very much again for trying to figure out what to do.

Sincerely
Raphael
 
I was thinking permissions may be the problem. So you can definitely create
a connection if you drag one from the designer and then use Verify
Connection?

Also, why not wrap the Open in a try catch block (or is it already in one?)
and see what trapping the OracleException will tell you. Often you see the
reverse problem happening, works on Winforms won't on ASP.NET and often b/c
it's a permission problem.

Not sure what it is but there has to be some clue. If you can create a
connection from the designer and it will verify connection, then it's got to
be something in the app we're overlooking. If you can't connect though,
then we're not going to be able to connect through code.

Let me know, we'll figure it out.

--
W.G. Ryan MVP Windows - Embedded

http://forums.devbuzz.com
http://www.knowdotnet.com/dataaccess.html
http://www.msmvps.com/williamryan/
 
Thanks again.

By using a try and catch block, I got for exception message "Connection
interrupted", and I can't figure out why.... I have tested the
connection and everything, and it doesn't change anything if I use the
code instead of draging an OracleConnection component in my form...

The problem number is ORA-12537 but I don't know what it refers to...

Any other clue ?

Thanks again for your help

Sincerely,

Raphael
 
it's not a firewall problem is it? ie is the oracle TNS listener port
(default 1521) is blocked by a firewall.
 
Back
Top