Board index » delphi » DataSet as Memory Only ....

DataSet as Memory Only ....

Hello, First I would like to use a dataset for storing records in
memory, and then (with my dataset filled) update the database, is it
possible???? or I'm drinky :)

Thanks in advance ....

 

Re:DataSet as Memory Only ....


Quote
Luis Prab Ximnez-Crdenas wrote:
> Hello, First I would like to use a dataset for storing records in
> memory, and then (with my dataset filled) update the database, is it
> possible???? or I'm drinky :)

Check out TClientDataSet and TUpdateSQL.

--
----------------------------------
Douglas J. Horton
Get paid to read your e-mail:
http://www.MintMail.com/?m=404448
----------------------------------

Re:DataSet as Memory Only ....


Mmm, TClientDataset is used with MIDAS isn't it????
Quote
"Douglas J. Horton" wrote:
> Luis Prab Ximnez-Crdenas wrote:

> > Hello, First I would like to use a dataset for storing records in
> > memory, and then (with my dataset filled) update the database, is it
> > possible???? or I'm drinky :)

> Check out TClientDataSet and TUpdateSQL.

> --
> ----------------------------------
> Douglas J. Horton
> Get paid to read your e-mail:
> http://www.MintMail.com/?m=404448
> ----------------------------------

Re:DataSet as Memory Only ....


I use TADODataset whenver I need to do what you're doing...

var
  AccountPortfolioList : TADODataset;

begin
  AccountPortfolioList := TADODataset.Create (Self);
  with TStringField.Create (AccountPortfolioList) do
  begin
    FieldName := 'Account';
    Size := 10;
    DataSet := AccountPortfolioList;
  end;
  with TStringField.Create (AccountPortfolioList) do
  begin
    FieldName := 'Portfolio';
    Size := 10;
    DataSet := AccountPortfolioList;
  end;
  with TStringField.Create (AccountPortfolioList) do
  begin
    FieldName := 'AccountNum';
    Size := 40;
    DataSet := AccountPortfolioList;
  end;
  AccountPortfolioList.CreateDataset;
end;

Then you can append, post, and update to this local dataset.  As far as
moving the data from this dataset back to the database,  it's really up to
you on how you want to do this.

This is mostly intented for keeping a local 'cache' that may be worked on
and disposed of later...

"Luis Prab Ximnez-Crdenas" <lxime...@avantel.net> wrote in message
news:3B60F5C1.D8C33077@avantel.net...

Quote
> Hello, First I would like to use a dataset for storing records in
> memory, and then (with my dataset filled) update the database, is it
> possible???? or I'm drinky :)

> Thanks in advance ....

Re:DataSet as Memory Only ....


Quote
Luis Prab Ximnez-Crdenas wrote:
> Mmm, TClientDataset is used with MIDAS isn't it????

Well, you never said you weren't using Midas, did you?
--
----------------------------------
Douglas J. Horton
Get paid to read your e-mail:
http://www.MintMail.com/?m=404448
----------------------------------

Re:DataSet as Memory Only ....


:) You have a point   :)

Thanks a lot !!

Quote
"Douglas J. Horton" wrote:
> Luis Prab Ximnez-Crdenas wrote:

> > Mmm, TClientDataset is used with MIDAS isn't it????

> Well, you never said you weren't using Midas, did you?
> --
> ----------------------------------
> Douglas J. Horton
> Get paid to read your e-mail:
> http://www.MintMail.com/?m=404448
> ----------------------------------

Other Threads