sjn78 Posted March 3, 2004 Posted March 3, 2004 I usually hard code any calls to a database when updating, deleting, reading etc, but now I am playing with databinding and using the Data controls supplied. I filled a datagird from an Access table and it seems to take a while to do this...there are only 2 records. It hangs for about 2-3 seconds before showing the data. Is this just a datagrid issue or is there a sigificant difference in speed using the built in controls or hard coding it. I haven't done any tests as of yet, so I thought I would see if anyone has tried it out. I would like to use databinding over hardcoding as from what I have seen it saves a lot of time. But if the performance is slower then I will have to think about what will be better in the long run. Quote
Moderators Robby Posted March 3, 2004 Moderators Posted March 3, 2004 I can't see any reason for a 2-3 second delay for two records let alone 200 records unless there is a network issue. Is the datasource on a local drive? If so, let's see the code you used. Quote Visit...Bassic Software
sjn78 Posted March 3, 2004 Author Posted March 3, 2004 I'm at work now, so I can't copy the code exaclty. The data is all on my local drive and i'm using Access. There are only about 7 fields in the table. On my form I have the OleDBConnection, OleDBAdapter & a Dataset. Then when the form loads I just call the fill method, think it is: OleDBAdapter.Fill(Dataset) Everything else to do with the connection and SQL is set in the controls on the designer. It's pretty basic stuff and the form has nothing else on it to slow it down. Thanks Quote
Answer Posted March 9, 2004 Posted March 9, 2004 You should nto be getting a delay. It seems like something else is screwed up. Possibly your connection string? Are you using the commandbuilder to make your queryies or anything, cuase i havent tried using that before so maybe thats it. Quote
sjn78 Posted March 9, 2004 Author Posted March 9, 2004 I used all of the wizard type setups for the connection and data adapter. So basically, there is only 1 line of code, and that is to fill the dataset when the form loads. Quote
*Experts* Nerseus Posted March 9, 2004 *Experts* Posted March 9, 2004 Is there a delay when filling the dataset, or just when binding? If it's the binding, does it make a difference if you return only one record versus hundreds? -nerseus Quote "I want to stand as close to the edge as I can without going over. Out on the edge you see all the kinds of things you can't see from the center." - Kurt Vonnegut
Answer Posted March 9, 2004 Posted March 9, 2004 Try not using the wizards, and manually specify the select statement and stuff of the dataadapter. I dont really know why it would matter, but whenever i run into a problem, i start to eliminate things one by one, usually starting with stuff i didnt specify myself. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.