D
David Doing
I have a SQL statement that takes our server 2 minutes to return results,
and when the program is waiting for the results it appears to be
hung/crashed. Is there a way to keep this from happening? It happens with
almost every program I write that reads data from our old AS/400. The
queries usually take 10 sec. to several minutes to return data from the
server. Can I use a timer to control this?
Here is the code:
strSQL = "SELECT F42119.SDDOC, F42119.SDDCT FROM BURNS.F42119 WHERE " & _
"F42119.SDIVD = " & strDate & " ORDER BY F42119.SDDOC"
daInvoices = New OleDb.OleDbDataAdapter(strSQL, strConnect)
'Takes 2 mintues to run and the program seems to be frozen
daInvoices.Fill(dtInvoices)
dgInvoices.DataSource = dtInvoices
Thanks,
David
and when the program is waiting for the results it appears to be
hung/crashed. Is there a way to keep this from happening? It happens with
almost every program I write that reads data from our old AS/400. The
queries usually take 10 sec. to several minutes to return data from the
server. Can I use a timer to control this?
Here is the code:
strSQL = "SELECT F42119.SDDOC, F42119.SDDCT FROM BURNS.F42119 WHERE " & _
"F42119.SDIVD = " & strDate & " ORDER BY F42119.SDDOC"
daInvoices = New OleDb.OleDbDataAdapter(strSQL, strConnect)
'Takes 2 mintues to run and the program seems to be frozen
daInvoices.Fill(dtInvoices)
dgInvoices.DataSource = dtInvoices
Thanks,
David