Oracle connection with WebService
- From: "MikeB" <MikeB@xxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Thu, 21 Jul 2005 11:08:04 -0700
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!
.
- Follow-Ups:
- Re: Oracle connection with WebService
- From: Paul Clement
- Re: Oracle connection with WebService
- From: W.G. Ryan MVP
- RE: Oracle connection with WebService
- From: Cowboy (Gregory A. Beamer) - MVP
- Re: Oracle connection with WebService
- Prev by Date: Re: OracleDataAdapter Update() not working
- Next by Date: Re: Business Layer - Data Layer
- Previous by thread: Obtaining Column Names Through GetOleDbSchemaTable
- Next by thread: RE: Oracle connection with WebService
- Index(es):
Relevant Pages
|
Loading