Icon View Thread

The following is the text of the current message along with any replies.
Messages 1 to 5 of 5 total
Thread In Memory Dataset
Fri, Aug 16 2019 12:46 AMPermanent Link

KimHJ

Comca Systems, Inc

I see another person have asked if it's possible to drop a dataset on a Dataunit and all the columns and you would have a In-Memory table.

I tried it, but I get an error when I try to Close it.

with InMemData.CurrentTbl do
        begin
           Open;
            InMemData.CurrentTbl.Insert;
            Columns['Name'].AsString := 'Myname';
            Save;
            Close;
         end;

Error: Database commit response error(Database 'InMemData" not found)

Is it not possible to do what I'm trying?

Thanks,
Kim
Fri, Aug 16 2019 5:47 AMPermanent Link

Matthew Jones

KimHJ wrote:

>              Save;

What do you expect to happen if you save? But the solution offered to me should work.

--

Matthew Jones
Mon, Aug 19 2019 12:25 PMPermanent Link

KimHJ

Comca Systems, Inc

"Matthew Jones" wrote:

>>What do you expect to happen if you save? But the solution offered to me should work.<<

Thanks Matthew,
I was expecting it to behave like a regular TTable or like KBmemTbl.

What you are saying is; as soon as I assign data to column it is there.
What I'm trying to do; on the order page have every item and quantity save in memory and when the order is placed same it to the Database.

I will try it with out save, thanks.

Kim
Mon, Aug 19 2019 8:48 PMPermanent Link

KimHJ

Comca Systems, Inc

KimHJ wrote:

>>Thanks Matthew,
I was expecting it to behave like a regular TTable or like KBmemTbl. <<

I got it to work as a in-memory table by turn of AutoTransactions in the TDataBase Unit.

Thanks,
Kim
Tue, Aug 20 2019 5:09 AMPermanent Link

Matthew Jones

KimHJ wrote:

> I got it to work as a in-memory table by turn of AutoTransactions in the TDataBase Unit.

I think there is some other consideration there, but if it's working, all good.

Me, I did my web shop with a simple TObjectList containing TCart items and custom display stuff, but obviously requirements change from application to application.

--

Matthew Jones
Image