Re: [sqlite] dump in-memory db to file in tcl

2009-10-07 Thread Alexey Pechnikov
Hello! 1. Use tcl backup API The "backup" method The "backup" method makes a backup copy of a live database. The command syntax is like this: dbcmd backup ?source-database? backup-filename The optional source-database argument tells which database in the current connection should be backed u

Re: [sqlite] dump in-memory db to file in tcl

2009-10-03 Thread Gerry Snyder
Ned Fleming wrote: > Is it possible to dump an in-memory sqlite database (or table?) to a > file from within Tcl? > > I create it like so: > > sqlite3 dbFireData :memory: > > and insert a bunch of records, and then commit. Is there reason not to attach a file (old or new), and either create

Re: [sqlite] dump in-memory db to file in tcl

2009-10-02 Thread Simon Slavin
On 2 Oct 2009, at 5:20pm, Ned Fleming wrote: > Is it possible to dump an in-memory sqlite database (or table?) to a > file from within Tcl? Not easily. MySQL has a pseudo-command which does what .dump does: returns a long piece of text with all the commands needed to reproduce the table. I

[sqlite] dump in-memory db to file in tcl

2009-10-02 Thread Ned Fleming
Is it possible to dump an in-memory sqlite database (or table?) to a file from within Tcl? I create it like so: sqlite3 dbFireData :memory: and insert a bunch of records, and then commit. I have tried the following (and variations) -- but no go, kokomo. ($fileOut3 is a handle to a com