R
Robert Brown
Hi All..
I am experiencing Timeouts after about 30-40 seconds when trying to
fill a dataset from SQL.
I have seen a lot of posts mentioning to set the commandtimeout
property, but how do you do that on an SQLAdapter? I setting a
connection timeout on the SQL Connector, but that didn't help.
Here is my code.. Can anyone help???? BTW: I am returning about 1
million records (hope the dataset can handle it...
Dim SQLLink As String =
"server=(local);Trusted_Connection=Yes;Database=FTO;Connection
Timeout=600"
Dim SQLConn As SqlConnection = New SqlConnection(SQLLink)
Dim daSQL As SqlDataAdapter
'Get OrderItem
sSql = "select * from tbl_OrderItems inner join tbl_OrderLog on
tbl_OrderItems.Ordernum = tbl_OrderLog.FOrdernum "
sSql += "where tbl_OrderLog.StartTD <= '" & DateRange1 & "' order by
tbl_orderlog.Ordernum"
daSQL = New SqlDataAdapter(sSql, SQLLink)
daSQL.Fill(dsOrderItems, "t1")
Thanks,
Robert
I am experiencing Timeouts after about 30-40 seconds when trying to
fill a dataset from SQL.
I have seen a lot of posts mentioning to set the commandtimeout
property, but how do you do that on an SQLAdapter? I setting a
connection timeout on the SQL Connector, but that didn't help.
Here is my code.. Can anyone help???? BTW: I am returning about 1
million records (hope the dataset can handle it...
Dim SQLLink As String =
"server=(local);Trusted_Connection=Yes;Database=FTO;Connection
Timeout=600"
Dim SQLConn As SqlConnection = New SqlConnection(SQLLink)
Dim daSQL As SqlDataAdapter
'Get OrderItem
sSql = "select * from tbl_OrderItems inner join tbl_OrderLog on
tbl_OrderItems.Ordernum = tbl_OrderLog.FOrdernum "
sSql += "where tbl_OrderLog.StartTD <= '" & DateRange1 & "' order by
tbl_orderlog.Ordernum"
daSQL = New SqlDataAdapter(sSql, SQLLink)
daSQL.Fill(dsOrderItems, "t1")
Thanks,
Robert