473,569 Members | 2,747 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Timeout on "DataAdapter.Fi ll"

Hi all

I have a timout problem when I call "DataAdapter.Fi ll".
When I debug, I see that all timeout settings are correct,
ConnectionTimeo ut is 0 and also CommandTimeout is 0.

But when I call the fill method I get:
"Timeout expired. The timeout period elapsed prior to completion of the
operation or the server is not responding."} System.Exceptio n
{System.Data.Sq lClient.SqlExce ption}

Here is what I do:
Conn.Connection String = "Data Source=ServerXY ;Initial Catalog=master; Connect
Timeout=0;Integ rated Security=SSPI;"
Command.Command Timeout = 0
System.Data.Sql Client.SqlDataA dapter local_DataAdapt er = new
System.Data.Sql Client.SqlDataA dapter(Query, Conn);
System.Data.Dat aSet local_DataSet = new System.Data.Dat aSet();
local_DataAdapt er.Fill(local_D ataSet, DataSetTableNam e);

Thanks for any comments !!

Regards
Frank
Oct 15 '07 #1
2 35350
"Frank Uray" <Fr*******@disc ussions.microso ft.comwrote in message
news:91******** *************** ***********@mic rosoft.com...
I have a timout problem when I call "DataAdapter.Fi ll".
When I debug, I see that all timeout settings are correct,
ConnectionTimeo ut is 0 and also CommandTimeout is 0.

But when I call the fill method I get:
"Timeout expired. The timeout period elapsed prior to completion of the
operation or the server is not responding."}
One case where this happens is if you are opening connections but not
closing them. Every time this happens, a connection is consumed, and when
you reach the configured maximum (typically 100), the next time that you
attempt to open a connection the system waits for one of the open
connections to be freed. Since this doesn't hapen, you finally get a timeout
error. The problem is that the faulty code is somewhere else (in the part of
the program that is opening and not closing the connections), and not in the
piece of code that displays the error, so it's difficult to debug.

Oct 15 '07 #2
I have found the problem:
On The DataAdapter there is also a CommandTimeout within
SelectCommand. This has to be set also ...

System.Data.Sql Client.SqlDataA dapter local_DataAdapt er = new
System.Data.Sql Client.SqlDataA dapter(Query, return_SQLNATIV EConnection);
System.Data.Dat aSet local_DataSet = new System.Data.Dat aSet();
local_DataAdapt er.SelectComman d.CommandTimeou t = 0;
local_DataAdapt er.Fill(local_D ataSet, DataSetTableNam e);


"Frank Uray" wrote:
Hi all

I have a timout problem when I call "DataAdapter.Fi ll".
When I debug, I see that all timeout settings are correct,
ConnectionTimeo ut is 0 and also CommandTimeout is 0.

But when I call the fill method I get:
"Timeout expired. The timeout period elapsed prior to completion of the
operation or the server is not responding."} System.Exceptio n
{System.Data.Sq lClient.SqlExce ption}

Here is what I do:
Conn.Connection String = "Data Source=ServerXY ;Initial Catalog=master; Connect
Timeout=0;Integ rated Security=SSPI;"
Command.Command Timeout = 0
System.Data.Sql Client.SqlDataA dapter local_DataAdapt er = new
System.Data.Sql Client.SqlDataA dapter(Query, Conn);
System.Data.Dat aSet local_DataSet = new System.Data.Dat aSet();
local_DataAdapt er.Fill(local_D ataSet, DataSetTableNam e);

Thanks for any comments !!

Regards
Frank
Oct 15 '07 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

9
24945
by: jensen bredal | last post by:
I have a dataView and i only want to get the first x rows . Is there a way of doing this without using Foreach? Thanks JB
1
1674
by: Big Dave | last post by:
I'm having trouble using the update command of a dataadapter. It would help if I could watch it go through each record in the datatable and see what it's doing. Is there a way to do this? Also, is there a way to see the actual sql statements it's executing, with the value of the parameters, for each update it performs? Thanks for any...
5
2071
by: .Net Sports | last post by:
I have an open datareader that gets data from an sql statement, but when I try to put it into a dataset so that my datagrid can pick it up, I get a 'System.Data.SqlClient.SqlDataReader' does not contain a definition for 'Fill' error // dsRevenue is my datareader object ds = new DataSet( ); drRevenue.Fill(ds);
3
1720
by: Tom Luetz II | last post by:
I'm having some trouble with the DataAdapter in my code. When the parameter in an OleDbCommand, which is created as having a type of OleDbType.Decimal, is set to System.DbNull, the actual value posted to the database upon execution of the Insert command is a floating point value of zero (0.0, actually). The DataAdapter is associated with a...
3
37801
by: Ed | last post by:
Hi, I want to load data to a table in Sql Server from a dataset table in my vb.net app using a dataAdapter. I know how to do this as follows (my question is to see if I can reduce the amount of code below): .... Dim DA As SqlDataAdapter = New SqlDataAdapter Dim Parm As New SqlParameter ....
3
3104
by: Jo Schambach | last post by:
I am trying to write a GUI with tkinter that displays the stdout from a regular C/C++ program in a text widget. The idea i was trying to use was as follows: 1) use "popen" to execute the C/C++ program 2) then use "tkinter.createfilehandler" to create a callback that would be called when the C/C++ program creates output on stdout. ...
0
2136
by: dalaeth | last post by:
I have searched Google high and low and haven't found anything that works. Here's my problem, hopefully someone will be able to help! I'm using 1.1 Framework, and ODP.NET 9.5.0.7 on a Windows 2003 Server. I have a cached DataSet that I fill using an OracleDataAdapter. Changes are made to that dataset in memory and as rows are changed,...
1
2070
by: Joey Nolan | last post by:
Hi, I have a PDF file on my site that I want to distribute freely but I want to be able to contact anyone who downloaded it to warn them about mistakes and modification and new versions and updates... So I need some way to keep their email addresses and someway to prevent them sharing the link to the PDF file. I've seen some sites -...
2
4196
by: slinky | last post by:
I'm getting a error when I open my . aspx in my browser... line 34: da.Fill(ds, "Assets") Here's the error and my entire code for this .aspx.vb is below that ... I need some clues as to what is causing the error... Thanks!!! Server Error in '/' Application. ---------------------------------------------------------------------------­----- ...
0
7609
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
7921
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
8118
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
1
7666
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
6278
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
1
5504
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
5217
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
1
1208
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
936
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.