maybe i wasn't clear. setting the activeconnection to nothing before closing
dim'd class object goes out of scope) keeps the data intact. if i just let
a cool side benefit. if i later reset the activeconnection to it's original
server and call .update, the recordset (bound to a data grid) updates the
database. just as good as using an adodc. better, really.
news:eZtdYENYBHA.1584@tkmsftngp03...
> Well, basically...
> If you want to have a disconnected recordset you need to have a
client-side
> cursor.
> the adOpenStatic is the only clientside cursor that you can have...
> To proof that, open a recordset with a clientside cursor and ask for an
> adOpenKeyset cursor. As soon as you've opened that recordset, the
cursortype
> will be adOpenStatic.
> I had a typo there with saying "adUseStatic". I meant "adOpenStatic"
> I find these remarks somewhat curious that "setting the activeconnection
> property closes the connection"
> I can beleive that this is true as long as you pass a connectionstring to
> the recordset.open method. That way, the recordset will create a
connection
> on the fly and close it as soon as you set the activeconnection to
nothing.
> It has to do that because you would have no other way to close that
> connection because you have no object associated to that connection.
> This, in my idea, is the most ideal way to work with ADO and I would not
> have cared less if they had just left the Connection object out. The
reason
> they did not do that is because there are a lot of users that do not work
> with SQL Server as the backend, but something like Access and with Access
it
> is preferable to keep the connection open for the duration of your
> application.
> I used the MSDN Library of April 2001 to find this information. I didn't
> look online so I think that a substantial part of the library is not
> installed on your machine. I would look into that if I were you.
> Anyways, glad I could help you...
> Sincerely,
> Evert
> --
> =======================================
> My email address has been altered to
> avoid unwanted email.
> Replies to the newsgroup only, please.
> Thanks,
> Evert Timmer:
> Transworld Software
> VC++, VB6, SQL Server Database Solutions
> http://www.transworld-software.com (under construction)
> =======================================
> "mike c" <mike.colas...@furmans.com> wrote in message
> news:u6$0NKMYBHA.1160@tkmsftngp03...
> > hi:
> > > Okay, I just typed in the words "disconnected" and "recordset" and
this
> is
> > a
> > > small part of what i found. Wonder with which words you were looking
for
> > it
> > the same. when i type in those words ( in search ) i don't get anything
> like
> > that. you must be referring to MSDN online.
> > > PS:
> > > It helped, didn't it?
> > yeah, i think you simplified things, thanks. check out this snip from
MSDN
> > CD:
> > Closing a Connection object that was used to open a Catalog has the same
> > effect as setting the ActiveConnection property to Nothing.
> > B.S. - setting active connection to nothing before closing the
connection
> > preserves the data in the recordset. closing the connection without
doing
> > that first wipes it out. So here's another situation where statements
like
> > >Easy to put the blame on MS when if fact it is your own knowledge that
it
> > is
> > >causing the problem...
> > break down.
> > are we talking about the faulty knowlege i acquired from ms? :-0
> > also, the cursor and lock settings don't seem to matter as was implied
(?)
> > in the post "How do I cut the cord?"
> > thanks again, and i'll peruse the online MSDN to see what i'm missing.
> > mike
> > "Evert Timmer" <nos...@somewhere.com> wrote in message
> > news:OclVjnLYBHA.1424@tkmsftngp03...
> > > HOWTO: Getting ADO Disconnected Recordsets in VBA/C++/Java,
> > Q184397
> > > INFO: Disconnected Recordsets with ADO or RDS,
> > > Q190717
> > > HOWTO: Using ADO Disconnected and Persisted Recordsets,
> > > Q195082
> > > INFO: Using Disconnected Hierarchical Recordsets,
> > > Q213856
> > > Okay, I just typed in the words "disconnected" and "recordset" and
this
> is
> > a
> > > small part of what i found. Wonder with which words you were looking
for
> > it
> > > ?
> > > HTH,
> > > Evert
> > > PS:
> > > It helped, didn't it?
> > > --
> > > =======================================
> > > My email address has been altered to
> > > avoid unwanted email.
> > > Replies to the newsgroup only, please.
> > > Thanks,
> > > Evert Timmer:
> > > Transworld Software
> > > VC++, VB6, SQL Server Database Solutions
> > > http://www.transworld-software.com (under construction)
> > > =======================================
> > > "mike c" <mike.colas...@furmans.com> wrote in message
> > > news:OYgnMbLYBHA.1936@tkmsftngp07...
> > > > most honorable wiseacre:
> > > > if
> > > > Set rs.ActiveConnection = Nothing ' your suggestion
> > > > connection.close ' what i need to do without killing the data
> > > > works, then thanks. I just got it working by copying a connected rs
to
> a
> > > > disconnected rs that i created.
> > > > yeah, your way works just fine. this means that closing the
connection
> > > with
> > > > an open recordset wipes out the rs unless you set the rs's
> > > activeconnection
> > > > to nothing before closing the connection, but:
> > > > > All this can be found in the MSDN. In fact, it is hard to miss it.
> > > > where does the MSDN specifically say that?
> > > > > All this can be found in the MSDN. In fact, it is hard to miss it.
> > > > If you enter "recordset" in the MSDN index you can view an article
> > called
> > > > "Shorthand for Creating a Recordset" which says you can create a
> > recordset
> > > > and append to the fields collection. It doesn't say how nor where to
> > find
> > > > out how, nor does it mention disconnected recordsets.
> > > > If you choose the disconnected recordset topic, you'll learn even
> less.
> > > It's
> > > > related to RDS bound controls and has nothing to do with creating an
> > adodb
> > > > recordset and putting data into it.
> > > > > All this can be found in the MSDN. In fact, it is hard to miss it.
> > > > since it's so easy to find, perhaps you could tell me how you found
> it.
> > > > funny, should be just as easy to say "Lookin MSDN under ..." or
"Type
> > ...
> > > in
> > > > the box in the MSDN index." as it is to say:
> > > > > All this can be found in the MSDN. In fact, it is hard to miss it.
> > > > get honest, already. you know damn well that it's not always easy to
> > find
> > > > what you need in the MSDN. if it were there wouldn't be so many
posts
> on
> > > > this group.
> > > > > My email address has been altered to
> > > > > avoid unwanted email.
> > > > there are other ways to > avoid unwanted email. like not being a
> > > wiseacre.
> > > > thanks
> > > > > Recordset:
> > > > > Cursorlocation = adUseClient
> > > > > CusrsorType = adUseStatic
> > > > > Open your recordset, using either an existing connection, or a
> > > > > connectionstring
> > > > > Set rs.ActiveConnection = Nothing
> > > > > Close your connection, the recordset will be disconnected from
then
> > on.
> > > > > ==
> > > > > Create a recordset on the fly, without any db connections:
> > > > > Create new recordset
> > > > > Use recordset.fields.append to append new fields
> > > > > Open the recordset adLockOptimistic
> > > > > Add rows to it or do whatever yoou wanna do with it...
> > > > > ========================================================
> > > > > HTH,
> > > > > Evert
> > > > > =======================================
> > > > > My email address has been altered to
> > > > > avoid unwanted email.
> > > > > Replies to the newsgroup only, please.
> > > > > Thanks,
> > > > > Evert Timmer:
> > > > > Transworld Software
> > > > > VC++, VB6, SQL Server Database Solutions
> > > > > http://www.transworld-software.com (under construction)
> > > > > =======================================
> > > > > "mike c" <mike.colas...@furmans.com> wrote in message
> > > > > news:uEi0axlXBHA.1972@tkmsftngp05...
> > > > > > when they created ADO.
> > > > > > not sure what i'm gonna do, but it'd be nice to keep my
recordset
> > > after
> > > > > > closing a connection.
> > > > > > .clone doesn't help
> > > > > > the info on memory recordsets is so thin, that it's debateable
if
> a
> > > mem
> > > > > rst
> > > > > > can be created without knowing the fieldnames , etc. of the rst
> you
> > > want
> > > > > to
> > > > > > clone
> > > > > > rapid application developement... what a joke
> > > > > > mike