[yunqa.de] Re: Disklite 3 Pro : Temporary table question

  • From: Delphi Inspiration <delphi@xxxxxxxx>
  • To: yunqa@xxxxxxxxxxxxx
  • Date: Sun, 01 Apr 2012 20:53:11 +0200

On 01.04.2012 17:19, Jon Burnham wrote:

> I was looking at the control, not in code, it warns me that I cannot 
> name a temp file when enabled.

I do not know what you did to "create a temp file at the control" so it
is hard for me to help avoiding the warning.

Please know that in DISQLite3, a memory database and a temporary table
are two different things. Memory databases are stored entirely in
memory, including all tables and indexes. A memory database is temporary
in that they are never written to disk, it memory is automatically freed
when the database is closed. No need to create temporary tables for
memory databases.

  DISQLite3.chm -> SQLite3 Documentation -> In-Memory Database

Temp tables are not kept in memory but are written to a separate disk
file, very much like regular tables. The only difference is that this
disk file (with all its tables) is automatically deleted when the
database is closed:

  DISQLite3.chm -> SQL Syntax -> CREATE TABLE
  DISQLite3.chm -> SQLite3 Documentation -> Temporary Dis Files used

My impression is that you are in fact looking for memory databases
rather than temporary tables.

> It would be good if you could do it from there. I just want to borrow
> a structure/data from an existing dataset and use it as a local SQL
> cache.

Did you try the TDISQLite3DataSetImporter class? It does not import at
design-time, but at run-time does exactly what you are looking for:
Create structure and copy data with just a single command.

Ralf
_______________________________________________
Delphi Inspiration mailing list
yunqa@xxxxxxxxxxxxx
//www.freelists.org/list/yunqa



Other related posts: