[yunqa.de] How to save in-memory DB?

  • From: Gregory Whitesides <whitesidesg@xxxxxxxxx>
  • To: yunqa@xxxxxxxxxxxxx
  • Date: Mon, 31 May 2010 05:54:37 -0700 (PDT)

Hello Ralf,

For example:

const
  SQL_CREATE_DB =
    'CREATE TABLE test (' +
    '"X" DOUBLE,' +
    '"Y" DOUBLE,' +
    '"NAME" TEXT)';

  { create in-memory DB }
  FDb := TDISQLite3Database.Create(nil);
  try
    FDb.DatabaseName := ':memory:'; 
    FDb.CreateDatabase;
    FDb.Execute16('PRAGMA locking_mode=exclusive');
    FDb.Execute16('PRAGMA synchronous=off');
    FDb.Execute16(SQL_CREATE_DB);
  except
    //...
  end;

  // ... Filling the DB with data

How to save this DB to local disk?

Regads,
Greg


      

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



Other related posts: