Load Database

xswzaq

Well-known member
Joined
Jul 9, 2007
Messages
61
Programming Experience
Beginner
I have combine two (three) database into one datagridview, and there are about 20 thousands of record on my datagrid. It take a supper long time to load the program. So I have a search button (hope to help it load faster, but not helping much (so is the filter)). Is there any wait that I can make the datagrid to load faster when debugging :confused:?

Thank You.
 
I have combine two (three) database into one datagridview, and there are about 20 thousands of record on my datagrid. It take a supper long time to load the program. So I have a search button (hope to help it load faster, but not helping much (so is the filter)). Is there any wait that I can make the datagrid to load faster when debugging :confused:?

Thank You.

First off, dont be so silly as to load 20 thousand rows into the client app :)
Remove the xxxTableAdapter.Fill(yyyDataTable) line from your form load event handler

Read the DW2 link in my sig, section on Creating a Form To Search Data

Never load 20 thousand rows into a control the user has to use
 
erm, 20k rows? that is like too much, if u want to use a search function, u have to disable remove .fill() and replace it with a search query
 
:(Thank you,

I guess my record is too long or because I combine two(three) table into one datagrid, it still took a long time. I took out the fill for the datagrid part and I create fillbylocation (query for location), but does not really help.:(
 
u shldnt combined ur tables then if u have a performance problem
 
I wish I could do that, but I am working right now. And in my company, they want me to do that. They have several table, and want to put it under one table to create a search form.
 
so you're using Joins in your SQL ?

As long as your query is properly structured, it shouldn't take that long.

Also, you are saying about it taking a long time when debugging, well that's to be expected...to see what it's going to run like in "production mode", use Ctrl+F5 to start the app from VS2005 instead of just F5
 
Yes i use select statement to select columns I want from different database/tables. if I use ctrl+F5, it take a while before I know it, my computer is freeze (not realy freeze, i can't do other things but not Microsoft Visual Studio. It doesn't let me do anything. It not responding and make my computer slow)
 
This could be an issue on your PC, mine loads instantly when using Ctrl+F5 and takes about 2-3 seconds to load app when using only F5.

It might be worth you pasting a screenshot of your SQL query, and the code you are using to load it on your form.
 
Might be true, I don't know, but I try my best to figure out what wrong.


Thank you all for your guidances. I appreciate very much.
 
If you have access to another PC with VS2005 installed, it may be worth trying to open your project on there to see if the same problems exist.

If they do, then it's definately an issue with your SQL statement / loading code.
If not, then PC is faulty :D
 
Thanks, but I only have one PC at my work place, and if I take copy of program and take home to try. It does not work because the sql connect direct to company database.
 
y not u post ur pc spec of the computer u use in ur company.
 
Back
Top