Click here to Skip to main content
16,014,816 members
Home / Discussions / Database
   

Database

 
QuestionWhat are the advantaeges of using ADO.NET Pin
rangaSL25-May-07 21:28
rangaSL25-May-07 21:28 
AnswerRe: What are the advantaeges of using ADO.NET Pin
Colin Angus Mackay26-May-07 0:55
Colin Angus Mackay26-May-07 0:55 
GeneralRe: What are the advantaeges of using ADO.NET Pin
rangaSL27-May-07 6:55
rangaSL27-May-07 6:55 
AnswerRe: What are the advantaeges of using ADO.NET Pin
raj@code26-May-07 1:31
raj@code26-May-07 1:31 
GeneralRe: What are the advantaeges of using ADO.NET Pin
rangaSL27-May-07 6:51
rangaSL27-May-07 6:51 
AnswerRe: What are the advantaeges of using ADO.NET Pin
Arun.Immanuel26-May-07 16:27
Arun.Immanuel26-May-07 16:27 
GeneralRe: What are the advantaeges of using ADO.NET Pin
rangaSL27-May-07 6:49
rangaSL27-May-07 6:49 
QuestionMulti threaded database access... Pin
abkareem25-May-07 10:03
abkareem25-May-07 10:03 
Hey gurus,

I have 2 threads, both of them are calling a method which is connecting to database and reading data.
Here is the thread function.
Everything is okay first thread. But, while calling SqlConnection.Open() from 2nd thread, I am getting exception.

Exception is "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."

But, by default pooling is true with maximum 100 connection. Here I created only one connection from 1st thread. Could you please help me....

Here is my thread fucntion...

<br />
private void StartLoading()<br />
<br />
{<br />
<br />
SqlCommand sqlCommand = null;<br />
<br />
SqlDataReader sqlDataReader = null;<br />
<br />
try<br />
<br />
{<br />
<br />
   sqlCommand = new SqlCommand();<br />
<br />
   sqlCommand.Connection = new SqlConnection("Data Source=XXX;Initial Catalog=XXXXX;Integrated Security=True");<br />
<br />
  sqlCommand.CommandText = " SELECT * FROM table";<br />
<br />
sqlCommand.CommandTimeout = 0;<br />
<br />
sqlCommand.Connection.Open();<br />
<br />
sqlDataReader = sqlCommand.ExecuteReader();<br />
<br />
while (sqlDataReader.Read())<br />
<br />
{<br />
<br />
// Processing....<br />
<br />
}<br />
<br />
}<br />
<br />
catch (Exception ex)<br />
<br />
{<br />
<br />
//.....<br />
}<br />
<br />
finally<br />
<br />
{<br />
<br />
if (null != sqlDataReader && !sqlDataReader.IsClosed)<br />
<br />
{<br />
<br />
sqlDataReader.Close();<br />
<br />
}<br />
<br />
if (null != sqlCommand && sqlCommand.Connection.State != ConnectionState.Closed)<br />
<br />
{<br />
<br />
sqlCommand.Connection.Close();<br />
<br />
}<br />
<br />
}<br />
<br />
}<br />
<br />

QuestionReturning Records with No Value (not null) if a specific field Pin
dboy22125-May-07 8:08
dboy22125-May-07 8:08 
AnswerRe: Returning Records with No Value (not null) if a specific field Pin
Colin Angus Mackay25-May-07 8:50
Colin Angus Mackay25-May-07 8:50 
GeneralRe: Returning Records with No Value (not null) if a specific field Pin
Dave Herren25-May-07 15:26
Dave Herren25-May-07 15:26 
GeneralRe: Returning Records with No Value (not null) if a specific field Pin
Colin Angus Mackay26-May-07 0:52
Colin Angus Mackay26-May-07 0:52 
GeneralRe: Returning Records with No Value (not null) if a specific field Pin
Dave Herren26-May-07 2:59
Dave Herren26-May-07 2:59 
AnswerRe: Returning Records with No Value (not null) if a specific field Pin
Senthil_M25-May-07 22:56
Senthil_M25-May-07 22:56 
QuestionStore procedure Pin
thanhphuong170325-May-07 6:07
thanhphuong170325-May-07 6:07 
AnswerRe: Store procedure Pin
Colin Angus Mackay25-May-07 8:44
Colin Angus Mackay25-May-07 8:44 
QuestionAdding New Records - failed validation Pin
User 380857925-May-07 5:42
User 380857925-May-07 5:42 
QuestionDatatype column type in SQL Server 2000 Pin
Senthil_M25-May-07 4:08
Senthil_M25-May-07 4:08 
AnswerRe: Datatype column type in SQL Server 2000 Pin
kubben25-May-07 4:54
kubben25-May-07 4:54 
GeneralRe: Datatype column type in SQL Server 2000 Pin
Senthil_M25-May-07 22:43
Senthil_M25-May-07 22:43 
GeneralRe: Datatype column type in SQL Server 2000 Pin
kubben26-May-07 0:25
kubben26-May-07 0:25 
GeneralRe: Datatype column type in SQL Server 2000 Pin
Senthil_M26-May-07 1:12
Senthil_M26-May-07 1:12 
GeneralRe: Datatype column type in SQL Server 2000 Pin
kubben26-May-07 2:55
kubben26-May-07 2:55 
QuestionAdding a column with checkboxes in SQL Pin
reegan4125-May-07 2:45
reegan4125-May-07 2:45 
AnswerRe: Adding a column with checkboxes in SQL Pin
Mark J. Miller25-May-07 7:03
Mark J. Miller25-May-07 7:03 

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.