BorlandTalk.com Forum Index BorlandTalk.com
Borland discussion newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Finding the datasets connected to an ADOConnection

 
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi Databases (ADO)
View previous topic :: View next topic  
Author Message
Dave Blake
Guest





PostPosted: Fri Aug 20, 2004 8:15 am    Post subject: Finding the datasets connected to an ADOConnection Reply with quote



What is the syntax for looping through all the datasets connected to an ADO
connection?

Having discovered that setting the ADOconnection.connected := false does not
close the datasets linked to it, and after say changing the connection
string and reconnecting, then subsequently dataset.open does not reopen
them properly... I want to loop through closing datasets before I mess with
the ADOconnection.

Mostly it is datasets that have accidentlally been saved with active = true
(because editing some data aware component in designing a report etc. has
silently opened it), and are thus loaded that way at runtime that worry me.
Change the connection at start-up, open datasets when needed, but if loaded
open already they don't work.

Dave (having a vague Friday)


Back to top
Viatcheslav V. Vassiliev
Guest





PostPosted: Fri Aug 20, 2004 9:16 am    Post subject: Re: Finding the datasets connected to an ADOConnection Reply with quote



TADOConnection.DataSetCount and TADOConnection.DataSets[i] could be used.


"Dave Blake" <barnswood (AT) hotmail (DOT) com> сообщил/сообщила в новостях следующее:
news:4125b339 (AT) newsgroups (DOT) borland.com...
Quote:
What is the syntax for looping through all the datasets connected to an
ADO
connection?

Having discovered that setting the ADOconnection.connected := false does
not
close the datasets linked to it, and after say changing the connection
string and reconnecting, then subsequently dataset.open does not reopen
them properly... I want to loop through closing datasets before I mess
with
the ADOconnection.

Mostly it is datasets that have accidentlally been saved with active =
true
(because editing some data aware component in designing a report etc. has
silently opened it), and are thus loaded that way at runtime that worry
me.
Change the connection at start-up, open datasets when needed, but if
loaded
open already they don't work.

Dave (having a vague Friday)





Back to top
Display posts from previous:   
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi Databases (ADO) All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.