Questions That Should Be Asked More Frequently

[Previous] [Next]

Q. Should I avoid using a Connection object if I'm not planning to use any of its properties and methods?

A. There's no definite answer to this question, but I use a Connection object unless I'm going to open only a single Recordset in my application. My recommendation is to use a Connection object until you have your application working the way you'd like. If you then want to try opening your Recordsets without a Connection object, give it a shot and see if you've improved performance. Also check that you aren't creating additional physical connections to your database. Just be sure to back up your application before making such changes. There's nothing worse than breaking an application that was working fine, and then not being able to easily revert back to the working version.

Q. Then should I generally use all of the other objects in the ADO object model as well?

A. Let's not jump to conclusions. If I give you all the answers in the second chapter, what kind of book would this be? We'll talk about ADO objects in more detail in Chapters 3 through 6. You'll learn about the features available in each object, and you should end up with a good idea of when to use each one.



Programming ADO
Programming MicrosoftВ® ADO.NET 2.0 Core Reference
ISBN: B002ECEFQM
EAN: N/A
Year: 2000
Pages: 131
Authors: David Sceppa

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net