Re: ADO with SQL Server 2000
For VB6/ADO, leaving the connection open for the life of the application is fine - just make sure you close it when you have completely finished.
If you want to, you can open/close the connection each time - with connection pooling there shouldn't be a noticeable difference either way.
Re: ADO with SQL Server 2000
Quote:
Background info: I have a VB6 application...[snip]
Quote:
Problem: In ADO.net it is easy to o...[snip]
ADO.NET... or ADO? ADO.NET is used in VB.NET ... VB6 still uses ADO (classic if you will).
As for opening the connection and leaving it open... it depends on the app and your architecture... in our system leaving the connection open all the time was unacceptable because of the architecture of our system. So we open when we need data, get the data (or save or what ever) and then close the connection. Some cases we'll open a connection, use it a dozen times, then close it. But for the most part it's process based.
-tg