Re: ado connection object in vb6
- From: "Ralph" <nt_consulting64@xxxxxxxxx>
- Date: Fri, 25 Apr 2008 07:20:33 -0500
"wb" <none> wrote in message news:uclYg7opIHA.2636@xxxxxxxxxxxxxxxxxxxxxxx
Ok, now I am confused. One person recommends local objects, you recommend
global objects.....
The basic model that I have used inside the dll is that when I need to
access the database I create a string variable and write the SQL. Then I
use a local adodb.recordset object (lets call it objRS) and I code a line
objRS.Open ("SQL string", global ado.connection).
I populate the record data into the object I am dealing with, say a
customer, and then I close the recordset and set it to nothing
WB
Lol!
I'm confused as well.
Jan's reply started out with ...
"Global connection objects are bad in so many ways. I guess
you're not even using transactions right?"
This was so incorrect (from a person I known to be knowledgeable) I assumed
he miss-understood your question. <g>
There is often a confusion between a "Connection to a Database" and a "ADO
Connection Object". The key is that ADO uses 'connection pooling'. It is
actually working with the pool that determines the best strategy for your
problem domain. (For example, some articles refer to pooling in an ASP
application and others to a Desktop application, others to a distributed
transactional environment. Each has subtle nuances in working with the ADO
Pool.
See if these help to remove the fog.
"A Dip in the Pool"
http://msdn2.microsoft.com/en-us/library/aa260761.aspx
"SQL Server Connection Pooling Myths"
By : Shawn Kresal
http://www.sql-server-performance.com/article_print.aspx?id=224&type=art
"PRB: Implicit Connections Created by the SQL Server OLE DB Provider
(SQLOLEDB) Are Not Pooled"
http://support.microsoft.com/?kbid=271128
"Pooling in the Microsoft Data Access Components"
http://msdn2.microsoft.com/en-us/library/ms810829.aspx
"Support WebCast: ODBC Connection Pooling and OLEDB Session Pooling in
Microsoft Data Access Components"
http://support.microsoft.com/default.aspx?scid=kb;en-us;324686
-ralph
.
- References:
- ado connection object in vb6
- From: wb
- Re: ado connection object in vb6
- From: Ralph
- Re: ado connection object in vb6
- From: wb
- ado connection object in vb6
- Prev by Date: Re: ado connection object in vb6
- Next by Date: Re: ado connection object in vb6
- Previous by thread: Re: ado connection object in vb6
- Next by thread: Re: ado connection object in vb6
- Index(es):
Relevant Pages
|
|