General discussion

Locked

Ref. of DAO/ADO

By e_kannan ·
Why we prefer the reference of the Data Objects(DAO,ADO & RDO),
in connecting Database instead of its Builting Data controls from VB Components.?
what is the main advantages of using references instead of Builtin controls?

Thank you,

This conversation is currently closed to new comments.

3 total posts (Page 1 of 1)  
| Thread display: Collapse - | Expand +

All Comments

Collapse -

by Jaqui In reply to Ref. of DAO/ADO

referencing the objects allows for updated object to be incorporated into the application without recoding.

using them directly means is they get updated you have to rebuild those parts of the code they are in.

Collapse -

by Juergen Hartl In reply to Ref. of DAO/ADO

Jaqui is absolutely correct.
Example:
If you use VB5 and us controlls you can only access MSAccess97 files.
If you use refs you can use the latest Access Files.

Collapse -

by MadestroITSolutions In reply to Ref. of DAO/ADO

Although referencing does allow you to update the components without recompiling your code (like mentioned above), I don't think this is the biggest advantage, since updating the components would be the same as updating MY component (I still do update, no matter what). I think the biggest advantage from referencing versus builtin controls is speed and control. You see, builtin controls are wrapper classes that do some of the work for you. If you add a control to a form, the control instance will be created when the parent class (in this case the form) is initialized. When you reference an object, you get to create an instance whenever you need, thus, eliminating unnecessary load and improving performance.

Unfortunately VB hides most of the class implementation details, but if you want to see all this for yourself, check out some C++ or .NET code (meaning all languages within .NET) out there!

Good luck!

Back to Web Development Forum
3 total posts (Page 1 of 1)  

Related Discussions

Related Forums