Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: Oracle .Net Problem

Re: Oracle .Net Problem

From: tojo <Tojo_at_hotmail.com>
Date: Mon, 14 Mar 2005 13:17:22 +0100
Message-ID: <MPG.1c9f9f3f2573308a989705@news.t-online.de>


In article <1110795918.983440.102990_at_f14g2000cwb.googlegroups.com>, kengie99_at_hotmail.com says...
> Dear All,
>
> I am getting an "ORA-6413: Connection not open" when using Oracle's
> .Net Data Provider. Before I was getting an ORA-12154 but that is
> resolved when I have add the code from tnsnames.ora, but I am getting
> "ORA-6413. I can't see anything wrong with the Coding. Please help.
> Many Thanks!
>
>
>
> My code is:
>
> connectionString = "Data Source=(DESCRIPTION = (ADDRESS_LIST = (ADDRESS
> = (PROTOCOL = TCP)(HOST = XXX.XXX.XXX.XXX)(PORT =
> XXXX)))(CONNECT_DATA=(SERVICE_NAME = XXX)));User Id=XXX;Password=XXX;"
>
> OradatabaseCon = New
> Oracle.DataAccess.Client.OracleConnection(connectionString)
> Debug.Write(OradatabaseCon.ConnectionString)
> OradatabaseCon.Close()
> OradatabaseCon.Open() 'FAILED TO OPEN LINK
>
>

Your code seems to be:

  1. Create new connection object
  2. Close the connection
  3. Open the connection

Just like the error message says, you are closing a connection that's not open. Maybe you meant to switch steps 2 and 3?

Received on Mon Mar 14 2005 - 06:17:22 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US