Connection Will Not Open.... What am I missing? — oracle-tech

    Forum Stats

  • 3,715,830 Users
  • 2,242,890 Discussions
  • 7,845,632 Comments

Discussions

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Connection Will Not Open.... What am I missing?

8600
8600 Member Posts: 5
Oracle.DataAccess.Client.OraException at Oracle.DataAccess.Client.OraException.HandleErrorHelper(Int32 errCode, OraConnection conn, IntPtr opsErrCtx, IntPtr opsSqlCtx, Object src, String procedure)
at Oracle.DataAccess.Client.OraException.HandleError(Int32 errCode, OraConnection conn, IntPtr opsErrCtx, Object src)
at Oracle.DataAccess.Client.OraConnection.Open()
at OracleApp.Form1.Form1_Load(Object sender, EventArgs e) in d:\webs\oracleapp\form1.cs:line 109


this is the error for the small test I am playing with using ODP.NET 9.2.0.1 Beta..

ConnectionString = "User Id=timecard;Password=timecard;Data Source=timecard;"; // as per docs...

I am assuming I am missing something connecting to an Oracle DB of 8i..

Jeff

Comments

  • 83753
    83753 Member Posts: 164
    Jeff,

    What is the error text obtained from the exception raised? It will provide you with information on why the connection attempt failed.

    Here are some items you can check:
    1) Can you connect as timecard/[email protected] using SQL*Plus? If not, the following may be true....
    a) It's possible that timecard/timecard is not a valid user on the database identified by the timecard OraNet service name.
    b) "timecard" is not a valid OraNet service name. (i.e. does the entry for "timecard" exist in your %ORACLE_HOME%\network\admin\tnsnames.ora file?

    thanks,

    nari
  • 8600
    8600 Member Posts: 5
    user and password exist. I created the users and tables that accompany it...

    tnsnames.ora is correct.. I set up the tnsnames..

    hmmm alias issue maybe on the server directly..

    Jeff
  • 233833
    233833 Member Posts: 49
    I have a similar problem (see also: my post in this forum)

    I get error number: -3002 (but the message text is empty).

    I also tried Oracle OLEDB Provider 9.2 and that one works. If I connect first using OLEDB and then try ODP again in the same run, then ODP also starts working. If I first try ODP, then OLEDB crashes too. (more details in my post)
  • 221638
    221638 Member Posts: 18
    Jeff,
    What is the error text obtained from the exception raised? It will provide you with information on why the connection attempt failed.
    Here are some items you can check:
    1) Can you connect as timecard/[email protected] using SQL*Plus? If not, the following may be true....
    a) It's possible that timecard/timecard is not a valid user on the database identified by the timecard OraNet service name.
    b) "timecard" is not a valid OraNet service name. (i.e. does the entry for "timecard" exist in your %ORACLE_HOME%\network\admin\tnsnames.ora file?
    thanks,
    nari
    I am having the same problem that Jeff reported. When I invoke MyConnection.Open, I get the same error stack: MyCode -> Oracle.DataAccess.Client.OraConnection.Open -> .HandleError -> .HandleErrorHelper. But there is no error text. The exception's source appears as "Oracle Data Provider for .NET", and like Philip, the exception number is "-3002". But the message is an empty string.

    I can use SQL*Plus, using MyUser/[email protected] to connect successfully to my database.

    I am using Oracle 9 client software to connect to an Oracle 8 database. Some of my coworkers have installed the same version and are executing successfully. I've obviously missed something or broken something. Any other suggestions as to where to look? I've already tried uninstalling and reinstalling my client and ODP applications.
This discussion has been closed.