Re: Oracle connection with WebService



Try/Catch does nothing because the "Open()" statement just hangs.

The connection string is valid, for one check out this article on the
OracleConnect.ConnectionString property...
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpref/html/frlrfsystemdataoracleclientoracleconnectionclassconnectionstringtopic.asp

and for a second thing, that couldn't be the problem because I'm able to
connect to and read from the Oracle database just fine from a Windows
application, using the identical code and connection string (as seen from my
original post) it just hangs in the WebService.....

Any other thoughts?

"W.G. Ryan MVP" wrote:

> Mike:
>
> Try/Catch the Open() statement and Trap OracleException.. see what the
> exception tells you. Also, it looks like you're using a Sql Server
> connection string instead of an Oracle connection string.
>
> "Data Source=DbName;User Id=user;Password=password;Integrated Security=no;"
>
> AFAIK, there's no UID or PWD for instance that will work w/ the Oracle
> provider.
> "MikeB" <MikeB@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
> news:1741896E-F15E-4C2B-B4D0-ABA8E8663637@xxxxxxxxxxxxxxxx
> >I wrote the following method to test connecting to an Oracle database:
> >
> > public static string HelloMyOracleDataWorld()
> > {
> > string ret = "";
> > string connectString = "Integrated
> > Security=false;PWD=password;UID=user;SERVER=server";
> > OracleConnection connection = new OracleConnection(connectString);
> > connection.Open();
> > string sqlQuery = "SELECT * FROM table WHERE id = '00000'";
> > OracleCommand dbCommandWrapper = new OracleCommand(sqlQuery,
> > connection);
> > using (IDataReader dataReader = dbCommandWrapper.ExecuteReader
> > (CommandBehavior.CloseConnection))
> > {
> > if(dataReader.Read())
> > {
> > ret = dataReader["PROJ_START_DT"].ToString();
> > }
> > }
> > return ret;
> > }
> >
> > The method works great when used from a Windows Application, but as soon
> > as
> > I call this method from a WebService the method just hangs on the
> > "connection.Open()" command. I don't have any of these problems when
> > connecting to SQL from WebServices, just Oracle.
> >
> > Is I missing something? I'm admittedly new to this framework but I
> > thought
> > this should be straight forward, and like I mentioned, it works just fine
> > from a Windows Application, why not from a WebService?
> >
> > Please help, I need to resolve this issue ASAP...
> >
> > Thanks!
>
>
>
.



Relevant Pages

  • Re: Does 2.0 still require ODP.NET to connect to Oracle?
    ... installation>> asks for all kinds of things in order to install. ... the oracle CLI installed, ... need that installed for the MS oracle provider. ... specify in the connection string. ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: Oracle Update Stored Procedure - cannot ROLLBACK in a distribu
    ... We are using Oracle 8.1.7.3. ... I have installed Framework v1.1 SP1 ... I have added enlist=false to the connection string ...
    (microsoft.public.dotnet.framework.adonet)
  • Re: Does 2.0 still require ODP.NET to connect to Oracle?
    ... I see that with framework 1.1 you had to download ODP.NET from ... oracle CLI installed, ... host names even matter when I'm going to be using a connection string ... client installation files, and don't need ODP.NET. ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: ADO Recordset
    ... use ODBC, and remember to put ODBC; in front of whatever they suggest. ... query, I'm now getting a "function sequence error". ... There has got to be something wrong with the Microsoft ODBC for Oracle ... However, if what you've got as the connection string is working for you, ...
    (microsoft.public.access.modulesdaovba)
  • Re: ODBC connection string
    ... I have setup an oracle10g database. ... connection string is? ... (SERVICE_NAME = orcl) ... I suggest that you use the Oracle ODBC client rather than the one ...
    (comp.databases.oracle.misc)