New topic: 

1:1 copy from a database in memory to disk

<http://forums.realsoftware.com/viewtopic.php?t=25812>

       Page 1 of 1
   [ 1 post ]                 Previous topic | Next topic         Author  
Message       spacewalker           Post subject: 1:1 copy from a database in 
memory to diskPosted: Mon Dec 29, 2008 3:28 pm                        
Joined: Thu Nov 08, 2007 4:59 am
Posts: 211
Location: Germany              Hello,

I need to make a copy of an in-memory database to disk (SQLite .RSD file)

Currently I use code like this:

Code:
...
// attach the database file to the in-memory one
in_mem_DB.attachDatabase( db.databaseFile,"db2" )

// copy alle records from in-mem to disk
in_mem_DB.sqlExecute "insert into db2.Sessions select * from Sessions"
...



But this works only as long as the tables of the in mem-db are identical with 
the tables on disk.
(I suppose this has something to do with the "Select * from" command..)

As soon as I add a column to the in_mem_DB then the code doesnt work - until I 
add an identical column to the DB on disk, too.

I wonder if there is a way to copy a database in memory to disk without first 
creating an identical empty database on disk ?

thank you     
_________________
Citrix Tools - Printer accounting - Windows-Group-monitoring - RADIUS 
loganalyzer
http://www.Scout-Soft.com  
                            Top           Display posts from previous: All 
posts1 day7 days2 weeks1 month3 months6 months1 year Sort by AuthorPost 
timeSubject AscendingDescending          Page 1 of 1
   [ 1 post ]     

-- 
Over 900 classes with 18000 functions in one REALbasic plug-in. 
The Monkeybread Software Realbasic Plugin v8.1. 

&lt;http://www.monkeybreadsoftware.de/realbasic/plugins.shtml&gt;

[email protected]

Reply via email to