DataAdaptor.FILL Timeout message

  • Thread starter Thread starter Darin
  • Start date Start date
D

Darin

I am doing a FILL command on an SQL DataAdaptor. It works fine for small
SELECT statements, but on large data selects, I receive:

Timeout expired. The timeout period elapsed prior to completion of the
operation or the server is not responding.

This always happens at 31 seconds.

I execute SQL commands (for SP's) and know the command.timeout command,
but there does not seem to be the same on a dataadaptor.fill command.

I have tried tweaking my connection string to include:

str &= "Min Pool Size=1;"
str &= "Max Pool Size=20;"
str &= "Connection reset=true;"
str &= "Connection timeout=3000;"

tying both connection reset=true & false. Neither make any difference.

I know, you will say make the select statement smaller. This dataset is
being passed to a DataDynamics active report, and it needs a datasource.

TIA

Darin
 
I dont understand what you mean. I am doing the following:

Dim strSQL As String
strSQL = "SELECT * FROM " & xquery
sqlDA = New SqlDataAdapter(strSQL, sqlConn)
sqlDA.Fill(sqlDS, in_code)

WHen it times out, it is ALWAYS at 30 seconds.

Darin
 
I got it - Thanks.

Dim strSQL As String
Dim sqlCmd As SqlCommand

strSQL = "SELECT * FROM " & xquery
sqlCmd = New SqlCommand(strSQL, sqlConn)
sqlCmd.CommandTimeout = 3000
sqlDA = New SqlDataAdapter
sqlDA.SelectCommand = sqlCmd
sqlDA.Fill(sqlDS, in_code)


Darin
 
Back
Top