S
sam
When I use ASP.Net via ADO.Net to retrieve data from MS SQL Server 2000, it
is always prompt error message "Timeout" if the number record is larger than
1 million.
May I know what is the best practise for pool large records for my case,
please?
Or it is limitation on ADO.Net or ASP.Net or .Net framework 1.1?
ASP.Net Coding
-----------------
Server.ScriptTimeout = 9000
Dim constr_GL_3a_2 As String = "server='SQLSVR'; user id='sa';
password='sa'; Database='ERP_ARCHIVAL';Connect Timeout=1200"
Dim sqlcon_GL_3a_2 As System.Data.SqlClient.sqlconnection = New
System.Data.SqlClient.sqlconnection(constr_GL_3a_2)
Dim sqlcmd_GL_3a_2 As System.Data.SqlClient.SqlCommand = New SqlCommand()
Dim sqlda_GL_3a_2 As New system.Data.SqlClient.sqldataAdapter()
Dim sqlprm1_GL_3a_2 As New system.Data.SqlClient.SqlParameter()
Dim sqlprm2_GL_3a_2 As New system.Data.SqlClient.SqlParameter()
Try
sqlcmd_GL_3a_2 = sqlcon_GL_3a_2.CreateCommand
sqlcmd_GL_3a_2.CommandText = "[General_Ledger]"
sqlcmd_GL_3a_2.CommandType = commandtype.StoredProcedure
sqlprm1_GL_3a_2 =
sqlcmd_GL_3a_2.Parameters.Add("@DateFrom",SqlDbType.Int,6)
sqlprm1_GL_3a_2.value = FlagFrDate
sqlprm2_GL_3a_2 =
sqlcmd_GL_3a_2.Parameters.Add("@DateTo",SqlDbType.Int,6)
sqlprm2_GL_3a_2.value = FlagToDate
sqlda_GL_3a_2.SelectCommand = sqlcmd_GL_3a_2
sqlcon_GL_3a_2.Open
sqlcmd_GL_3a_2.ExecuteNonQuery
Finally
sqlcon_GL_3a_2.Close()
sqlcon_GL_3a_2.Dispose()
End Try
constr_GL_3a_2 = Nothing
sqlcon_GL_3a_2 = Nothing
sqlcmd_GL_3a_2 = Nothing
sqlda_GL_3a_2 = Nothing
is always prompt error message "Timeout" if the number record is larger than
1 million.
May I know what is the best practise for pool large records for my case,
please?
Or it is limitation on ADO.Net or ASP.Net or .Net framework 1.1?
ASP.Net Coding
-----------------
Server.ScriptTimeout = 9000
Dim constr_GL_3a_2 As String = "server='SQLSVR'; user id='sa';
password='sa'; Database='ERP_ARCHIVAL';Connect Timeout=1200"
Dim sqlcon_GL_3a_2 As System.Data.SqlClient.sqlconnection = New
System.Data.SqlClient.sqlconnection(constr_GL_3a_2)
Dim sqlcmd_GL_3a_2 As System.Data.SqlClient.SqlCommand = New SqlCommand()
Dim sqlda_GL_3a_2 As New system.Data.SqlClient.sqldataAdapter()
Dim sqlprm1_GL_3a_2 As New system.Data.SqlClient.SqlParameter()
Dim sqlprm2_GL_3a_2 As New system.Data.SqlClient.SqlParameter()
Try
sqlcmd_GL_3a_2 = sqlcon_GL_3a_2.CreateCommand
sqlcmd_GL_3a_2.CommandText = "[General_Ledger]"
sqlcmd_GL_3a_2.CommandType = commandtype.StoredProcedure
sqlprm1_GL_3a_2 =
sqlcmd_GL_3a_2.Parameters.Add("@DateFrom",SqlDbType.Int,6)
sqlprm1_GL_3a_2.value = FlagFrDate
sqlprm2_GL_3a_2 =
sqlcmd_GL_3a_2.Parameters.Add("@DateTo",SqlDbType.Int,6)
sqlprm2_GL_3a_2.value = FlagToDate
sqlda_GL_3a_2.SelectCommand = sqlcmd_GL_3a_2
sqlcon_GL_3a_2.Open
sqlcmd_GL_3a_2.ExecuteNonQuery
Finally
sqlcon_GL_3a_2.Close()
sqlcon_GL_3a_2.Dispose()
End Try
constr_GL_3a_2 = Nothing
sqlcon_GL_3a_2 = Nothing
sqlcmd_GL_3a_2 = Nothing
sqlda_GL_3a_2 = Nothing