My system processes a large number of records which takes hours to complete. Due to this, the connection sometimes gets cut in the middle. How do I code such that there will be a chance to reconnect it and resume the process? It should not also cause a hang in the server.
- webrider -
Code:
Connhandle_A = Sqlconnect("Db1","Sa","")
Connhandle_B = Sqlconnect("Db2","Sa","")
Query = 'Select ...'
=Sqlexec(Connhandle_A,Query,Cursor1)
Select Cursor1
Do While Not Eof()
&& Some Codes...
Query2 = 'Select ...'
If Sqlexec(Connhandle_B,Query2,Cursor2) < Success
Aerror(Laerrors)
Messagebox(Laerrors[2],16,"Error In Connection")
Sqldisconnect(Connhandle_A)
Sqldisconnect(Connhandle_B)
Quit
Endif
&& Some Codes ....
Enddo
Sqldisconnect(Connhandle_A)
Sqldisconnect(Connhandle_B)
- webrider -