Hi I have been working on an application with access Db;now that my app is about to get finished I want to convert it to Sql.
(for some reasons such as better security and limitation of size,I read somewhere max of an access file is 2GB)
In order to connect to my access db ,I ve used both Data control and Adodc control.
now my question is ;should I change all data controls to adodc for converting?
Thread moved from the 'CodeBank VB6' forum (which is for you to post working code examples, not questions) to the 'Database Development' forum
You should not use both DAO (with is what "Data control" is) and ADO in the same application (no matter what database system you are working with), as you can cause all kinds of problems for yourself, such as data added/edited/deleted in one not being shown correctly in the other for a 'random' period of time after the change.
Unless you have a very special reason, you should not be using DAO at all after the year 2001, and the VB6 help files for DAO (written in 1998) clearly state that you should not use it for any new development.
Really you should not use either control and should write ADO code instead but if you must use a control use the ADO and remove any references to DAO from your project.
DAO was obsolete more than 10 years ago. VB6 includes it for backward compatiably with VB6 but is really geared to use ADO where as DAO was standard practice in VB5
thank you so much I wish I had consulted sooner with you,if I used both it's because I had to(or didn't I),I mean to connect textboxes and msflexgrids only DAOs appear in datasource properties so what else could I do?
I don't know how to deal with that, because like most people I rarely use bound controls, but I suspect there is an easy answer. For an explanation of why it is usually a bad idea to use bound controls, see the article Why is using bound controls a bad thing? from our Database Development FAQs/Tutorials(at the top of this forum)
That article contains a link to the recommended alternative (ADO code), which has an example that replicates the main features of the data control. There are many other articles in the "Classic VB - ADO" section of the FAQs thread (particularly "the further steps" article), which help you to extend it in many ways - like adding search functionality, working with other controls, etc.
Whatever the reason(s) you have, using ADO and DAO in the same project is a very bad idea, and you should avoid it.
Using DAO at all is also a bad idea, so you should generally avoid that too.
Bound controls have their uses, but in VB6 and earlier they are problematic for all but the simplest of situations, so should generally be avoided too.
thank you so much so I should find a way to convert my DAO to ADO; and what about dataenviroment which I have used for my reports?if I have dataenviroment and ado together is ok?