Re: ado connection object in vb6




"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







.



Relevant Pages

  • Re: pooled connection myth
    ... grouping is only done at the resource driver ... There is no reusability of connection objects created ... > connection objects, necessarily, those connection objects go away. ... You're right that a regular JDBC driver doesn't support connection pooling at all. ...
    (comp.lang.java.programmer)
  • Re: pooled connection myth
    ... There is much to be gained by reusing known open connection objects, ... grouping is only done at the resource driver ... >You're right that a regular JDBC driver doesn't support connection pooling at all. ...
    (comp.lang.java.programmer)
  • Re: pooled connection myth
    ... the usefulness of concurrent sharing for connection objects varies by the ... the Connection object does contain state information. ... Other types of resources, including ... assertions about connection pooling in general which aren't valid. ...
    (comp.lang.java.programmer)
  • Re: pooled connection myth
    ... > than issuing single use connection objects for each request. ... > objects are not modified by using transaction blocks, ... connection pooling, and very emphatically excluded simple credential ...
    (comp.lang.java.programmer)
  • RE: DCpromo issue. Health check on AD and group policy.
    ... new DC to create new inbound connection objects (You can't even via ... RAM / perf on most DC's, KCC was not autogening connection obj's. ... We have 2 DNS servers, Bart is the primary DNS server ...
    (microsoft.public.windows.server.active_directory)