Re: [sqlite] Saving an in-memory database to file

2008-06-01 Thread Bruce Robertson
>> On Sat, May 31, 2008 at 9:48 PM, Bruce Robertson <[EMAIL PROTECTED]> wrote: >>> Here's a more basic example. This is really just a shell script formatting >>> problem and it must be really simple. I'm trying to use \n as new line. The >>> result I want from the echo statement is as follows but

Re: [sqlite] Saving an in-memory database to file

2008-06-01 Thread Bruce Robertson
> On Sat, May 31, 2008 at 9:48 PM, Bruce Robertson <[EMAIL PROTECTED]> wrote: >> Here's a more basic example. This is really just a shell script formatting >> problem and it must be really simple. I'm trying to use \n as new line. The >> result I want from the echo statement is as follows but I

Re: [sqlite] Saving an in-memory database to file

2008-05-31 Thread Keith Goodman
On Sat, May 31, 2008 at 9:48 PM, Bruce Robertson <[EMAIL PROTECTED]> wrote: > Here's a more basic example. This is really just a shell script formatting > problem and it must be really simple. I'm trying to use \n as new line. The > result I want from the echo statement is as follows but I can't

Re: [sqlite] Saving an in-memory database to file

2008-05-31 Thread Bruce Robertson
Here's a more basic example. This is really just a shell script formatting problem and it must be really simple. I'm trying to use \n as new line. The result I want from the echo statement is as follows but I can't figure out how to set x to get there. A B C D set x="A\nB\nC\nD"; echo $x > On

Re: [sqlite] Saving an in-memory database to file

2008-05-31 Thread Bruce Robertson
No, I'm trying to do what I said I'm trying to do. Pass a series of commands to a single sqlite action and get back all the results. Here's a little more representative example done as applescript. I'm trying to generalize it so I can use it with some other command line tools (FileMaker shell

Re: [sqlite] Saving an in-memory database to file

2008-05-31 Thread Keith Goodman
On Sat, May 31, 2008 at 8:57 PM, Keith Goodman <[EMAIL PROTECTED]> wrote: > On Sat, May 31, 2008 at 8:30 PM, Bruce Robertson <[EMAIL PROTECTED]> wrote: >> An example of how to do this with the shell would be helpful. >> >> Oddly enough I can do it with applescript; but I can't do it with some

Re: [sqlite] Saving an in-memory database to file

2008-05-31 Thread Keith Goodman
On Sat, May 31, 2008 at 8:30 PM, Bruce Robertson <[EMAIL PROTECTED]> wrote: > An example of how to do this with the shell would be helpful. > > Oddly enough I can do it with applescript; but I can't do it with some other > shell tools I'm trying to use. > > My problem has to do with how to pass

Re: [sqlite] Saving an in-memory database to file

2008-05-31 Thread Bruce Robertson
An example of how to do this with the shell would be helpful. Oddly enough I can do it with applescript; but I can't do it with some other shell tools I'm trying to use. My problem has to do with how to pass multiple lines to a single command. I'm sure it's quite simple but I keep poking around

Re: [sqlite] Saving an in-memory database to file

2008-05-31 Thread John Stanton
Mark Stewart wrote: > > John Stanton-3 wrote: > >>I wonder why you do not just use a file in the first place. Sqlite >>caches data in memory so a file based database and memory based perform >>much the same. >> > > > For this app, I didn't want to ask the user to enter a filename for a new

Re: [sqlite] Saving an in-memory database to file

2008-05-31 Thread Mark Stewart
John Stanton-3 wrote: > > I wonder why you do not just use a file in the first place. Sqlite > caches data in memory so a file based database and memory based perform > much the same. > For this app, I didn't want to ask the user to enter a filename for a new document before they decided

Re: [sqlite] Saving an in-memory database to file

2008-05-31 Thread John Stanton
I wonder why you do not just use a file in the first place. Sqlite caches data in memory so a file based database and memory based perform much the same. Mark Stewart wrote: > > > Jay A. Kreibich-2 wrote: > >> Of course, I assume Mark wants to do this via code. That will >> require

Re: [sqlite] Saving an in-memory database to file

2008-05-31 Thread Mark Stewart
Jay A. Kreibich-2 wrote: > > Of course, I assume Mark wants to do this via code. That will > require poking around the shell code to see how the ".dump" command > is implemented within the command shell. > Yes, I'm trying to do this using the C API. I'll have a look through the .dump

Re: [sqlite] Saving an in-memory database to file

2008-05-30 Thread Jay A. Kreibich
On Fri, May 30, 2008 at 09:24:29PM -0700, Bruce Robertson scratched on the wall: > Well, an interesting illustration of basic sqlite; but no relation to the > question being asked. Actually, it is a good answer to the question that was asked. Running SQLite without a database file creates an

Re: [sqlite] Saving an in-memory database to file

2008-05-30 Thread Bruce Robertson
Well, an interesting illustration of basic sqlite; but no relation to the question being asked. > On 5/30/08, Mark Stewart <[EMAIL PROTECTED]> wrote: >> >> Is there a recommended way to save an in-memory database to a file? Is >> there >> a way to access the underlying in-memory data

Re: [sqlite] Saving an in-memory database to file

2008-05-30 Thread P Kishor
On 5/30/08, Mark Stewart <[EMAIL PROTECTED]> wrote: > > Is there a recommended way to save an in-memory database to a file? Is there > a way to access the underlying in-memory data directly to save out to disk > (if that would even work)? > > My other thought was to create an empty file based

[sqlite] Saving an in-memory database to file

2008-05-30 Thread Mark Stewart
Is there a recommended way to save an in-memory database to a file? Is there a way to access the underlying in-memory data directly to save out to disk (if that would even work)? My other thought was to create an empty file based db and attach it, creating tables and transferring all the data

Re: [sqlite] Saving an in-memory database to file

2007-07-25 Thread miguel manese
007 7:05 AM Subject: [sqlite] Saving an in-memory database to file > Hi > > If I create an in-memory database (by opening with ":memory:"), then add > tables etc to it, is it possible to then write it to a disk file so it can > subsequently be used as a file-based db? > >

Re: [sqlite] Saving an in-memory database to file

2007-07-24 Thread Mohd Radzi Ibrahim
How about dumping and import into new db? - Original Message - From: "Colin Manning" <[EMAIL PROTECTED]> To: <sqlite-users@sqlite.org> Sent: Wednesday, July 25, 2007 7:05 AM Subject: [sqlite] Saving an in-memory database to file Hi If I create an in-memor

[sqlite] Saving an in-memory database to file

2007-07-24 Thread Colin Manning
Hi If I create an in-memory database (by opening with ":memory:"), then add tables etc to it, is it possible to then write it to a disk file so it can subsequently be used as a file-based db? Thanks -- No virus found in this outgoing message. Checked by AVG. Version: 7.5.476 / Virus