S
Sam
I had large database (transaction record > 1 million) at SQL Server and I
trying to load data from SQL Server into Datagrid via ASP.Net 1.1 and
ADO.Netx.
However, it give error message as below during processing.
While I checked at Query Analyser, it take 2 minutes + for search this
record and it is working fine.
Questions?
- What wrong at my coding? How about web.config?
- How to resolve this issue?
- Why ADO.Net / ASP.Net 1.1 does not support large connection pooling?
Please advise.
Many thanks.
Error Message
---------------
Timeout expired. The timeout period elapsed prior to completion of the
operation or the server is not responding.
Description: An unhandled exception occurred during the execution of the
current web request. Please review the stack trace for more information
about the error and where it originated in the code.
Exception Details: System.Data.SqlClient.SqlException: Timeout expired. The
timeout period elapsed prior to completion of the operation or the server is
not responding.
Source Error:
Line 90: Try
Line 91: rptcon.Open()
Line 92: Dim okrd As SqlDataReader = rptcmd.ExecuteReader()
Line 93:
Line 94: ReportDataGrid.DataSource = okrd
ASPX Coding
--------------
Dim rptcon As New
SqlConnection(ConfigurationSettings.AppSettings("ConnectionString"))
Dim rptcmd As New SqlCommand()
rptcmd.CommandText = "Select GLDOC, GLDCT, gldate, GLEXA,
GLEXR, account_num, amount from f0911"
rptcmd.Connection = rptcon
Try
rptcon.Open()
Dim okrd As SqlDataReader = rptcmd.ExecuteReader()
ReportDataGrid.DataSource = okrd
ReportDataGrid.DataBind()
okrd.Close()
Finally
rptcon.Close()
End Try
End If
Web.Config Coding
---------------------
<!-- Web.Config Configuration File -->
<configuration>
<appSettings>
<add key="ConnectionString"
value="server=SQLSVR;database=ERP;uid=User;pwd=User;" />
</appSettings>
<system.web>
<compilation debug="true" />
<authentication mode="Forms">
<forms name="ERP" loginUrl="authentication.aspx"
protection="All" path="/" timeout="20"/>
</authentication>
<authorization>
<allow users="user1,user2"/>
<deny users="*"/>
</authorization>
<customErrors mode="Off" />
</system.web>
</configuration>
trying to load data from SQL Server into Datagrid via ASP.Net 1.1 and
ADO.Netx.
However, it give error message as below during processing.
While I checked at Query Analyser, it take 2 minutes + for search this
record and it is working fine.
Questions?
- What wrong at my coding? How about web.config?
- How to resolve this issue?
- Why ADO.Net / ASP.Net 1.1 does not support large connection pooling?
Please advise.
Many thanks.
Error Message
---------------
Timeout expired. The timeout period elapsed prior to completion of the
operation or the server is not responding.
Description: An unhandled exception occurred during the execution of the
current web request. Please review the stack trace for more information
about the error and where it originated in the code.
Exception Details: System.Data.SqlClient.SqlException: Timeout expired. The
timeout period elapsed prior to completion of the operation or the server is
not responding.
Source Error:
Line 90: Try
Line 91: rptcon.Open()
Line 92: Dim okrd As SqlDataReader = rptcmd.ExecuteReader()
Line 93:
Line 94: ReportDataGrid.DataSource = okrd
ASPX Coding
--------------
Dim rptcon As New
SqlConnection(ConfigurationSettings.AppSettings("ConnectionString"))
Dim rptcmd As New SqlCommand()
rptcmd.CommandText = "Select GLDOC, GLDCT, gldate, GLEXA,
GLEXR, account_num, amount from f0911"
rptcmd.Connection = rptcon
Try
rptcon.Open()
Dim okrd As SqlDataReader = rptcmd.ExecuteReader()
ReportDataGrid.DataSource = okrd
ReportDataGrid.DataBind()
okrd.Close()
Finally
rptcon.Close()
End Try
End If
Web.Config Coding
---------------------
<!-- Web.Config Configuration File -->
<configuration>
<appSettings>
<add key="ConnectionString"
value="server=SQLSVR;database=ERP;uid=User;pwd=User;" />
</appSettings>
<system.web>
<compilation debug="true" />
<authentication mode="Forms">
<forms name="ERP" loginUrl="authentication.aspx"
protection="All" path="/" timeout="20"/>
</authentication>
<authorization>
<allow users="user1,user2"/>
<deny users="*"/>
</authorization>
<customErrors mode="Off" />
</system.web>
</configuration>