Hello,
I am using ASP with a SQL 7.0 database and ADODB connection string. The queries are simple but takes enormous amount of time to retrieve the dataset and most of the time gives a Timeout expired error message.
Using
commandtimeout = 0 'seconds
Server.ScriptTimeOut=240
is also not helping...
The database has around 123468 records.
An example of the query is as follows:
sql = "SELECT .,.,.,.,.,FROM a,b,c where a.SM_DoTM=1 and a.SM_AccNumber=b.SM_AccNumber and a.SM_TMDiag=c.D3_DiagCode and b.SM_Received between '"& Session("SDate"&"' and '"& Session("EDate"&"' and TblSampMain.SM_HospID ="& Session("Hospital"&" and a.SM_TMRndx IN ("&Session("Stat0"&","&Session("Stat1"&","&Session("Stat2"&","&Session("Stat3"&" and b.SM_PatType IN("&Session("Udefine"&","&Session("Screen"&","&Session("Sick"&","&Session("Special"&"" &" order by b.SM_AccNumber"
Set rs = Server.CreateObject("ADODB.Recordset"
rs.Open sql_h, conn, 3, 3
If (rs.eof) and (rs.bof) then
response.redirect "error_rpt2.asp"
Else
rs.movefirst
Any suggestions....
I am using ASP with a SQL 7.0 database and ADODB connection string. The queries are simple but takes enormous amount of time to retrieve the dataset and most of the time gives a Timeout expired error message.
Using
commandtimeout = 0 'seconds
Server.ScriptTimeOut=240
is also not helping...
The database has around 123468 records.
An example of the query is as follows:
sql = "SELECT .,.,.,.,.,FROM a,b,c where a.SM_DoTM=1 and a.SM_AccNumber=b.SM_AccNumber and a.SM_TMDiag=c.D3_DiagCode and b.SM_Received between '"& Session("SDate"&"' and '"& Session("EDate"&"' and TblSampMain.SM_HospID ="& Session("Hospital"&" and a.SM_TMRndx IN ("&Session("Stat0"&","&Session("Stat1"&","&Session("Stat2"&","&Session("Stat3"&" and b.SM_PatType IN("&Session("Udefine"&","&Session("Screen"&","&Session("Sick"&","&Session("Special"&"" &" order by b.SM_AccNumber"
Set rs = Server.CreateObject("ADODB.Recordset"
rs.Open sql_h, conn, 3, 3
If (rs.eof) and (rs.bof) then
response.redirect "error_rpt2.asp"
Else
rs.movefirst
Any suggestions....