Oracle connection with WebService



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: rman connection authorization
    ... Copyright 1982, 2005, Oracle. ... But connecting to rman requires me to spell it out ... ... initialization of internal recovery manager package failed ... RMAN-04005: error from target database: ...
    (comp.databases.oracle.server)
  • Re: rman connection authorization
    ... Copyright 1982, 2005, Oracle. ... But connecting to rman requires me to spell it out ... ... initialization of internal recovery manager package failed ... RMAN-04005: error from target database: ...
    (comp.databases.oracle.server)
  • RE: Access 2k3 Front End to Oracle 10g Back End design thoughts
    ... First of all you must install something to ... Oracle is difficult, but do-able; however, how are you going to test the ... I was reading through all of the posts regarding connecting Access to Oracle, ... able to link all the forms / reports etc... ...
    (microsoft.public.access.tablesdbdesign)
  • RE: Speed test for connecting to Oracle for Windows via ODBC
    ... I can understand frustration but your request is too nebulous for those who ... contributed - like connecting from a vmware host). ... Your "blame the network guy statements" miss the point that for a lot of us ... Speed test for connecting to Oracle for Windows via ODBC ...
    (perl.dbi.users)
  • RE: Problem with connecting to an Oracle database using Perl
    ... Problem with connecting to an Oracle database using Perl ... *IS* described in the DBD::Oracle perldocs - as the perldocs are included ... I do not have a problem connecting to the remote database using the Oracle ...
    (perl.dbi.users)

Loading