Hi!
It should be possible to create a SQLite database in memory, on the fly, create and populate tables and do sql operations on them. Other components (DISqlite) can do that.
Any ideas how this could be done using Zeos?
Regards,
Rüdiger
How to create a database in memory?
Moderators: gto, cipto_kh, EgonHugeist
-
- Fresh Boarder
- Posts: 4
- Joined: 27.02.2008, 22:43
Hi Rüdiger
that's easy, drop a zeos TZConnection component on a form or datamodule and set the database to ":memory:" (without the quotes " " of course but both colons ( : ) at each end are important. Set the "Connected" property to true and just point the TZQuery/TZReadOnlyQuery/TZTable components you add to this connection. that's it really.
If you Disconnect (or set the Active state to false) on the TZConnection, you'll effectively drop any database/tables you've created etc.
It definitely does work with Zeos :-)
Chrs
that's easy, drop a zeos TZConnection component on a form or datamodule and set the database to ":memory:" (without the quotes " " of course but both colons ( : ) at each end are important. Set the "Connected" property to true and just point the TZQuery/TZReadOnlyQuery/TZTable components you add to this connection. that's it really.
If you Disconnect (or set the Active state to false) on the TZConnection, you'll effectively drop any database/tables you've created etc.
It definitely does work with Zeos :-)
Chrs
-
- Fresh Boarder
- Posts: 1
- Joined: 05.05.2008, 08:59