Disconnected datasets

Disconnected datasets

Post by Gary Warde » Sat, 29 Nov 2003 19:15:20


Hi,

Is it possible to do disconnected datasets using Delphi's ADO objects?

If so, how is it done?

Gary
 
 
 

Disconnected datasets

Post by Andy Macki » Sat, 29 Nov 2003 21:48:25


Yes - use CreateDataSet. See the CreateDataSet example in the Delphi help
under TClientDataSet. You can use the same technique on ADODataSets, which
then creates a disconnected ADO recordset behind the scenes.

Andy Mackie.

 
 
 

Disconnected datasets

Post by Mike Colli » Sat, 29 Nov 2003 23:04:57

> Is it possible to do disconnected datasets using Delphi's ADO objects?

IIRC you use Client Side cursor location , then set the connection to
nothing. You should then have a dataset that is disconnected from any
server.

ADO Browser for viewing ADO properties on your system.
http://www.yqcomputer.com/
https://www.regsoft.net/regsoft/vieworderpage.php3?productid=64520
 
 
 

Disconnected datasets

Post by Gary Warde » Sun, 30 Nov 2003 06:17:31

Hmm,

I'm using Delphi 6 and my help file says:

"Applications should not need to call CreateDataSet themselves.
CreateDataSet is called automatically by an ADO dataset to create its
recordset."

No example is give.??
 
 
 

Disconnected datasets

Post by Andy Macki » Tue, 02 Dec 2003 19:10:18


Have a look at the example for TClientDataSet, which will also work for
TADODataSet. Mind you, it depends what you want to achieve. Is it retrieve
data from a database then disconnect ? If so, Mike's suggestion of setting
the connection to nil should do the trick. If however you want to create an
in-memory dataset without talking to a database, then CreateDataSet is what
you need - see Brian's example.

Andy Mackie.
 
 
 

Disconnected datasets

Post by Gary Warde » Sat, 06 Dec 2003 01:55:52

Hi,

What I wanted was to get some data read-only from a database server at the
start of a transaction and have it hang around for the rest of the
transaction.

Setting to nil worked, although I think I tried that and it didn't work
before. But maybe something was different before.

Thanks,

Gary