Icon View Thread

The following is the text of the current message along with any replies.
Messages 1 to 7 of 7 total
Thread Create at runtime a DBISAM table from DBISAM Tables (Version 3)
Tue, Mar 7 2006 5:26 AMPermanent Link

"John"
Hello,

I have 2 tables one with 10 fields the other one with 5 fields).
I want to create a onMemory table with 15 fields (10 from the first one and
5 from the second one) at run time.
Of course I could do it manually, but the main problem is that the structure
of the 2 tables could change (tommorrow I can have30 field and 6 fields for
iinstance). So it will be clever to create the inMemory table in a clever
way by run time (taking all the field from the 2 tables).

Is it possible to do this?

Thanks

John

Tue, Mar 7 2006 5:40 AMPermanent Link

Roy Lambert

NLH Associates

Team Elevate Team Elevate

John

Just use SELECT * INTO Memory\TableName FROM Table1 JOIN Table2 .....


Roy Lambert
Tue, Mar 7 2006 6:00 AMPermanent Link

"John"
Thanks Roy for your reply.
So I suppose that I have to use a TDBISAMQuery not a TDBISAMTable.
Does it works also if Table 1 and Table2 are InMemory tables ? (it's my
case)

Thanks

John

Tue, Mar 7 2006 9:15 AMPermanent Link

Roy Lambert

NLH Associates

Team Elevate Team Elevate

John

Don't forget the query is only to do the creation bit you end up with a new in-memory table.

In answer to the second part it will work with any dbisamtable. In-memory tables are essentially the same as disk tables just that they live (and die) in memory.


Roy Lambert
Tue, Mar 7 2006 9:38 AMPermanent Link

"John"
Thanks Roy for your answer.
Just for curiosity, is it possible to save an in Memory table to a DBISam
table file?

Tue, Mar 7 2006 9:39 AMPermanent Link

Roy Lambert

NLH Associates

Team Elevate Team Elevate

John


Yup - use copytable


Roy Lambert
Tue, Mar 7 2006 9:42 AMPermanent Link

"PINKO"

"John" <prout@nospam.com> wrote in message
news:A261657F-2219-4ABB-9C80-869E601FB2E2@news.elevatesoft.com...
> Thanks Roy for your answer.
> Just for curiosity, is it possible to save an in Memory table to a DBISam
> table file?
>

see table.CopyTable

Robert

Image