Click here to Skip to main content
15,900,461 members
Home / Discussions / C#
   

C#

 
AnswerRe: Books on OOPS and C# Pin
Christian Graus9-Jan-07 10:13
protectorChristian Graus9-Jan-07 10:13 
AnswerRe: Books on OOPS and C# Pin
KevinMac9-Jan-07 17:01
KevinMac9-Jan-07 17:01 
GeneralRe: Books on OOPS and C# Pin
Blumen10-Jan-07 5:23
Blumen10-Jan-07 5:23 
GeneralRe: Books on OOPS and C# Pin
KevinMac10-Jan-07 6:12
KevinMac10-Jan-07 6:12 
GeneralRe: Books on OOPS and C# Pin
Blumen11-Jan-07 6:20
Blumen11-Jan-07 6:20 
QuestionCollectionEditor problem Pin
Barguast29-Jan-07 8:21
Barguast29-Jan-07 8:21 
GeneralRe: CollectionEditor problem Pin
Barguast29-Jan-07 23:22
Barguast29-Jan-07 23:22 
QuestionTimeout expired. The timeout period elapsed prior to obtaining a connection from the pool. This may have occurred because all pooled connections were in use and max pool size was reached. Pin
btsrinath9-Jan-07 7:44
btsrinath9-Jan-07 7:44 
Hi All,

I am trying to connect to Oracle database via C# service application. When I try to open the connection i get the exception "Timeout expired. The timeout period elapsed prior to obtaining a connection from the pool. This may have occurred because all pooled connections were in use and max pool size was reached." This happens at very first instance(not after some interval...)

I have tried to search this on the net, but all in vain. Most of them have given the answere as to check with the connection. Below is the code snippit I am using to connect to database.

string csQuery = "prc_ins_sample";
string strConnection = "User ID=xxxx;Password=xxxx;Data Source=xxxxx;";
OracleConnection OraConn = new OracleConnection();
try
{
OraConn.ConnectionString = strConnection;
HMLog.WriteEntry("OraConn.Open();");
OraConn.Open();
OracleCommand OraCmd = new OracleCommand(csQuery, OraConn);
OraCmd.CommandType = CommandType.StoredProcedure;
HMLog.WriteEntry("OraConn.Open()");

OracleParameter arg_month = new OracleParameter();
arg_month.OracleType = OracleType.Number;
arg_month.Direction = ParameterDirection.Input;
arg_month.ParameterName = "arg_month";
arg_month.Value = 10;
OraCmd.Parameters.Add(arg_month);

arg_month = new OracleParameter();
arg_month.ParameterName = "arg_mybal";
arg_month.Direction = ParameterDirection.Output;
arg_month.OracleType = OracleType.Number;
OraCmd.Parameters.Add(arg_month);

HMLog.WriteEntry("Before execution");
int iRecordCount = OraCmd.ExecuteNonQuery();
if ( iRecordCount > 0 )
{

}
OraConn.Close();
OraConn.Dispose();
}
catch(Exception ex)
{
HMLog.WriteEntry(ex.Message);
if (OraConn.State != ConnectionState.Closed ) OraConn.Close();
OraConn.Dispose();
}

Does any one know to get out of this problem.

Srinath
AnswerRe: Timeout expired. The timeout period elapsed prior to obtaining a connection from the pool. This may have occurred because all pooled connections were in use and max pool size was reached. Pin
Dave Kreskowiak9-Jan-07 7:55
mveDave Kreskowiak9-Jan-07 7:55 
GeneralRe: Timeout expired. The timeout period elapsed prior to obtaining a connection from the pool. This may have occurred because all pooled connections were in use and max pool size was reached. Pin
btsrinath9-Jan-07 8:55
btsrinath9-Jan-07 8:55 
GeneralRe: Timeout expired. The timeout period elapsed prior to obtaining a connection from the pool. This may have occurred because all pooled connections were in use and max pool size was reached. Pin
Dave Kreskowiak9-Jan-07 8:59
mveDave Kreskowiak9-Jan-07 8:59 
GeneralRe: Timeout expired. The timeout period elapsed prior to obtaining a connection from the pool. This may have occurred because all pooled connections were in use and max pool size was reached. Pin
btsrinath9-Jan-07 9:37
btsrinath9-Jan-07 9:37 
GeneralRe: Timeout expired. The timeout period elapsed prior to obtaining a connection from the pool. This may have occurred because all pooled connections were in use and max pool size was reached. Pin
Dave Kreskowiak9-Jan-07 9:43
mveDave Kreskowiak9-Jan-07 9:43 
GeneralRe: Timeout expired. The timeout period elapsed prior to obtaining a connection from the pool. This may have occurred because all pooled connections were in use and max pool size was reached. Pin
btsrinath9-Jan-07 9:55
btsrinath9-Jan-07 9:55 
GeneralRe: Timeout expired. The timeout period elapsed prior to obtaining a connection from the pool. This may have occurred because all pooled connections were in use and max pool size was reached. Pin
btsrinath10-Jan-07 5:31
btsrinath10-Jan-07 5:31 
AnswerRe: Timeout expired. The timeout period elapsed prior to obtaining a connection from the pool. This may have occurred because all pooled connections were in use and max pool size was reached. Pin
Luc Pattyn9-Jan-07 9:50
sitebuilderLuc Pattyn9-Jan-07 9:50 
GeneralRe: Timeout expired. The timeout period elapsed prior to obtaining a connection from the pool. This may have occurred because all pooled connections were in use and max pool size was reached. Pin
btsrinath9-Jan-07 10:25
btsrinath9-Jan-07 10:25 
GeneralRe: Timeout expired. The timeout period elapsed prior to obtaining a connection from the pool. This may have occurred because all pooled connections were in use and max pool size was reached. Pin
Luc Pattyn9-Jan-07 10:50
sitebuilderLuc Pattyn9-Jan-07 10:50 
GeneralRe: Timeout expired. The timeout period elapsed prior to obtaining a connection from the pool. This may have occurred because all pooled connections were in use and max pool size was reached. Pin
btsrinath9-Jan-07 11:41
btsrinath9-Jan-07 11:41 
GeneralRe: Timeout expired. The timeout period elapsed prior to obtaining a connection from the pool. This may have occurred because all pooled connections were in use and max pool size was reached. [modified] Pin
Luc Pattyn9-Jan-07 11:54
sitebuilderLuc Pattyn9-Jan-07 11:54 
QuestionDetermining time of query end Pin
sopho249-Jan-07 7:07
sopho249-Jan-07 7:07 
AnswerRe: Determining time of query end Pin
btsrinath9-Jan-07 12:00
btsrinath9-Jan-07 12:00 
Questionwriting in a file Pin
netJP12L9-Jan-07 6:12
netJP12L9-Jan-07 6:12 
AnswerRe: writing in a file Pin
WillemM9-Jan-07 6:17
WillemM9-Jan-07 6:17 
GeneralRe: writing in a file Pin
netJP12L9-Jan-07 6:29
netJP12L9-Jan-07 6:29 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.