Newbie: Application freezes with bigger table

  • Thread starter Thread starter steve
  • Start date Start date
S

steve

Hi,

I am using a DataReader on a local network with SQL Server, to fill up a
ListView.

Playing with the examples (NorthWind) everything runs like a charm. The
ListView gets filled up fast, the column headers have their names, everyone
is happy!

When i perform a simple SELECT * FROM myTable, where my table has 160,000
rows X 35 cols, .... the application freezes after 10 seconds.
Is this considered too much? Should it be done with stored procedures ?
Is it a Listview problem ?

TIA
 
There is a TimeOut member on the connection and command objects. Try
setting them to 0 (infinite) and see if the application works. If that
fixes your problem then try other TimeOut settings that seem more reasonable
than the defaults.
http://msdn.microsoft.com/library/d...oledboledbcommandclasscommandtimeouttopic.asp
http://msdn.microsoft.com/library/d...ledbconnectionclassconnectiontimeouttopic.asp

As far as the ListView, I don't know if that has an upper bound, I'll have
to check around for that info.
-Nate
 
Steve,

As I work with the Listview (what I am actualy doing now), it appears for me
very slow even when I set the listview.beginupdate and listview.endupdate. I
do not know if you use the last properties so maybe you can try if that
gives any advantage.

Astored procedure will in my opinion in this almost nothing (although it is
always better using it so why not, when you are sure the commands are right)
the rows has to be readed, when your database is by instance access that
will be in my opinon very slow with the amount of rows you tell, however as
well with any other database it will need time depending on the content. (A
big blob will cost you a lot of time).

I hope this helps something?

Cor
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top