ZTable linked with TEMPORARY TABLE

The stable tester's forum for ZeosLib 7.0.x series

Report problems concerning our Delphi 2009+ version and new Zeoslib 7.0 features here.
Post Reply
aleroot
Fresh Boarder
Fresh Boarder
Posts: 13
Joined: 21.02.2013, 22:27

ZTable linked with TEMPORARY TABLE

Post by aleroot »

HI,
I have an application that make use of a lot of temporary tables, and i was wondering if it is possible to link a TEMPORARY TABLE with a ZTable object or if there is a better way to handle this kind of tables .

Anyone have any suggestion ?


Thanks.
User avatar
EgonHugeist
Zeos Project Manager
Zeos Project Manager
Posts: 1936
Joined: 31.03.2011, 22:38

Re: ZTable linked with TEMPORARY TABLE

Post by EgonHugeist »

Why wondering? Can you provide a little example?
Some more details would be usefull to support you..
Best regards, Michael

You want to help? http://zeoslib.sourceforge.net/viewtopic.php?f=4&t=3671
You found a (possible) bug? Use the new bugtracker dude! http://sourceforge.net/p/zeoslib/tickets/

Image
aleroot
Fresh Boarder
Fresh Boarder
Posts: 13
Joined: 21.02.2013, 22:27

Re: ZTable linked with TEMPORARY TABLE

Post by aleroot »

Basically I need a ZTAble that link to a Temporary table, this means that the TABLE in the database is created with :

CREATE TEMPORARY TABLE sometable (on Mysql, POstgresql, ...)
CREATE TABLE #sometable (on mssql)


I need these kind of tables because I want them dropped automatically at the Connection close moment, without worring about dropping those table by hand.
User avatar
EgonHugeist
Zeos Project Manager
Zeos Project Manager
Posts: 1936
Joined: 31.03.2011, 22:38

Re: ZTable linked with TEMPORARY TABLE

Post by EgonHugeist »

Didn't test it yet, but..

I don't see any objections to use such tables. IMHO is the TZTable not usable for that. TZTable needs meta-informations about the structures and i don't think they are available in the system-tables.

So i propose you use TZQuery instead. It might be possible you need also the TZUpdateSQL component for update/insert/delete-stmts.

Feel free to test and post your expierences..
Best regards, Michael

You want to help? http://zeoslib.sourceforge.net/viewtopic.php?f=4&t=3671
You found a (possible) bug? Use the new bugtracker dude! http://sourceforge.net/p/zeoslib/tickets/

Image
User avatar
mdaems
Zeos Project Manager
Zeos Project Manager
Posts: 2766
Joined: 20.09.2005, 15:28
Location: Brussels, Belgium
Contact:

Re: ZTable linked with TEMPORARY TABLE

Post by mdaems »

Hi,

It should be possible to use temporary tables for all databases that show these tables as part of the normal metadata queries (eg. mysql).
The main problem is that the metadata caches should be cleaned after creating new temporary tables and before opening the ZQuery or ZTable components.

I haven't done the stuff above myself yet. But I remember I wrote an application that used temporary tables. So it IS possible. Even using ZTable. But getting the metadata (and then have full updatable resultsets) is more difficult because of the caching issues.

Mark
Image
Post Reply