PDA

Click to See Complete Forum and Search --> : Datacontrol vs DAO


David Laplante
Nov 4th, 1999, 10:15 PM
I'm starting to build my first database vb application (actually my first vb app) and read some topics about using data controls. I'm used to Access developpement and very familiar with recordsets.

Someone here wrote that he was using 6-7 data controls within his tab control and was complaining about the loading speed. I'm now up to 4 data controls, which are still not slowing down my form load because I only have 3 binded text controls. I just added 6-7 other binded text controls and already noticed a slow down when changing tab.

The person who wrote about this same problem got an answer telling him to get rid of the data controls and use DAO instead... that it meant more coding etc. I'm ready to make that sacrafice but what could this mean exactly? Does that mean opening recordsets and setting its values to the appropriate textboxes? I guess not, this would make it very difficult to handle changes in these textboxes.

As you may see, I'm a bit lost in all of this... If anyone could fresh out some important fact I would really appreciate. (or link me to any kind of FAQs or other forums)

Thanks a lot!

David Laplante
Nov 5th, 1999, 12:33 AM
Thanks, I'll try this out.
And if I stick to data controls, let's say I have 3 major forms. Maybe I could, and I want your opinion (!), break the unused data controls connections to the database and only enable the one I'm currently needing?

Though I don't know how I could do that. Maybe by playing with the RecordSource and DatabaseName properties? Or with the Enabled property.

Thanks a lot.

Ghost
Nov 5th, 1999, 11:47 AM
Every data control on a form, creates a dedicated connection to the database. So, if you have 4 data control, you are creating 4 connection which can hamper the performance.

The other way is to user DAO/RDO/ADO to connect to the database and process the data. Its true that you will sacrifice the flexiblity of Data Control, but by using DAO/RDO/ADO, you will create a more robust application.

Yes, you will have to open your recordsets, explicitly assign the values to the textboxes and keep track of changes made, so you can update the fields later.

HTH