ADO.Net 1.1

  • Thread starter Thread starter Sam
  • Start date Start date
S

Sam

I had large database about 2GB size and consist of 1 million+ records.

I use ADO.Net 1.1 in ASP.Net 1.1 for connection pooling this database and it
always prompt "Stack Memory Error".

The information request is about 2MB if I running at SQL Query Analyzer.

Please advise.

Many thanks.



Coding
-------
Dim okcon As New
SqlConnection(ConfigurationSettings.AppSettings("ConnectionString"))
Dim okcmd As New SqlCommand()

okcmd.CommandText = "Select gbaid,account_num,acc_desc,amount from f0902
where gbmcu = " & _
TextBox_Account.Text & " and gblt = '" &
DropDownlist_LedgerType.SelectedItem.Value & _
"' and amount <> 0 and dateyear like '%" & DateYear & "%' order by
account_num"

okcmd.Connection = okcon

Try
okcon.Open()
Dim okrd As SqlDataReader = okcmd.ExecuteReader()

myDataGrid.DataSource = okrd
myDataGrid.DataBind()

okrd.Close()

Finally
okcon.Close()
okcon.Dispose()

myDataGrid.DataSource = Nothing
myDataGrid.Dispose()
End Try
 
Sam,

Whatever error you get, do you mean that you try to get for an aspnet
application 2Mb of data to sent to the user?

Cor
 
Where do you get the error?
Can you show us some code?
As Cor mentioned, why are you sending 2Gb data through asp.net at once?
Can you use paging instead?
 
Miha,
As Cor mentioned, why are you sending 2Gb data through asp.net at once?
Can you use paging instead?
You make the same thinking mistake as me, however I did not write it.

:-))))

Cor
 
Back
Top