-- de f <[EMAIL PROTECTED]> wrote:
> Thanks Jay.
> 
> Great! This could work...
>  
> I'm wondering, though if you know whether the limitation below
> (from sqlite documentation) could be safely circumvented if
> attaching the source db with an alias name.  It seems to work
> when i try it but I'm concerned that there might be other
> unknown issues.
> 
> "You cannot create a new table with the same name as a table in
> an attached database, but you can attach a database which
> contains tables whose names are duplicates of tables in the main
> database. It is also permissible to attach the same database
> file multiple times."

I wrote a c++ replicator for my own database. I did this:

open db1;

SELECT sql FROM sqlite_master WHERE type = 'table' AND name =
'yourtable';

open db2;

execute sql from step 2 against db2 to create a duplicate blank table;

close db2;

attatch db2 to db1;

insert into db2.yourtable
select * from db1.yourtable;

close all;



---------------------------------

You a Gamer? If you're near Kansas City, ask me about the Recruits and Conquest 
conventions.
---------------------------------

The Castles of Dereth Calendar: a tour of the art and architecture of Asheron's 
Call
http://www.lulu.com/content/77264


                
__________________________________ 
Yahoo! Messenger 
Show us what our next emoticon should look like. Join the fun. 
http://www.advision.webevents.yahoo.com/emoticontest

Reply via email to