Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

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.

  • Moderators
Posted
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.
Visit...Bassic Software
Posted

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

Posted
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.
Posted

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.

  • *Experts*
Posted

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

"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
Posted
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.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...