 |
BorlandTalk.com Borland discussion newsgroups
|
| View previous topic :: View next topic |
| Author |
Message |
Dave Blake Guest
|
Posted: Fri Aug 20, 2004 8:15 am Post subject: Finding the datasets connected to an ADOConnection |
|
|
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
|
Posted: Fri Aug 20, 2004 9:16 am Post subject: Re: Finding the datasets connected to an ADOConnection |
|
|
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 |
|
 |
|
|
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
|
|