When does the DataAccessAdapter Open a Connection?

Posts   
 
    
KristianP
User
Posts: 32
Joined: 23-Feb-2005
# Posted on: 15-Dec-2009 23:13:28   

Hello,

I'm trying to figure out how the data access adapter opens and closes its connection. lets say i do not set KeepConnectionOpen. So does it open when calling a fetch routine then immediately close or does it open once instantiated? Just trying to figure out what class scope to keep my adapter at.

Thanks

daelmo avatar
daelmo
Support Team
Posts: 8245
Joined: 28-Nov-2005
# Posted on: 16-Dec-2009 04:07:01   

When you perform an action on the DataAccessAdapter, If there is a connection to use, it use it, if the connection is already open, it doesn't reopen it. Then the connection is closed if you didn't specify "keepConnectionOpen" and if there is not a transaction in progress.

(Edit) You can download sourcecode to see what exactly happens with the connection.

David Elizondo | LLBLGen Support Team