Getting a timeout when filling a dataset table??  
Author Message
mike11d11





PostPosted: .NET Framework Data Access and Storage, Getting a timeout when filling a dataset table?? Top

I'm doing a simple TableAdapter.Fill filling my datatable from a view
within a SQL database. for some reason it is timing out after 30
seconds and I cant seem to find out where in vb.net 2005 I can go to
change the timeout setting for this. when i go to my project, then my
settings tab i set the connection timeout for 120, but it doesn't seem
to affect the timeout for filling my datatable.

Code used to fill datatable:
Me.Duplicates_ViewTableAdapter.Fill(Me.ALDataSet.Duplicates_View)

Settings for the connection to the SQL server:
Data Source=TLSQL;Initial Catalog=AL;Persist Security Info=True;User
ID=AL;Password=ALMMEN23L1;Asynchronous Processing=True;Connect
Timeout=120




.NET Development21  
 
 
Marcelo Lopez Ruiz - MSFT





PostPosted: .NET Framework Data Access and Storage, Getting a timeout when filling a dataset table?? Top

Connect Timeout controls how much time to wait for a connection to the database to succeed. It is also available as a property on the SqlConnection instance and is documented at http://msdn2.microsoft.com/en-us/library/system.data.sqlclient.sqlconnection.connectiontimeout.aspx.

The Fill method is probably timing out during the command execution, which is controlled through the CommandTimeout property documented at http://msdn2.microsoft.com/en-us/library/system.data.sqlclient.sqlcommand.commandtimeout.aspx. The default value is 30 seconds. Note that changing this value will require you to explicitly work on the SelectCommand, where you have access to this property.

Marcelo - MFST