Re: [sqlite] Realtime Backup of Database

2008-08-05 Thread Stephen Oberholtzer
On Tue, Aug 5, 2008 at 4:36 PM, Till Steinbach <[EMAIL PROTECTED]> wrote: > Hi Ingo! > Although I'm limited to C-Code your code would be really useful for > me. The triggers will be the same for me. When I have the right > triggers the most difficult part is done. The idea with the seperate >

Re: [sqlite] Creating Indexes

2008-08-05 Thread Stephen Woodbridge
Jeffrey Becker wrote: > I have a table 'SiteMap' defined as : > > Create Table SiteMap > ( > NodeID blob not null PRIMARY KEY, > Title text NOT NULL UNIQUE, > Url text NOT NULL > ); > > I'd like to index on the node's parent value as defined by the > expression

Re: [sqlite] Clone SQLite databases

2008-08-05 Thread csabi81
Triggers are also copied. the original database has no views; anything escapes from me? any other parts of a database? It can be a problem because I manipulate Firefox3 sqlite databases, I am working on a small app which securely deletes some well known apps History, one of these apps is

Re: [sqlite] Using transactions gives SQLITE_ERROR

2008-08-05 Thread Ken
1. yes the methods should still work. 2. PRAGMA synchronous= OFF and PRAGMA journal_mode = OFF    will put your DB at risk of corruption, I'd only do this if you can re-create the db from scratch. 3. Using threads will not help Only one connection to the DB can be writing. 4. OK TRY: BEGIN

Re: [sqlite] Clone SQLite databases

2008-08-05 Thread Ken
I wouldn't be too worried about the size then if you have the indexes and the data is there. How about triggers? Views etc? --- On Tue, 8/5/08, csabi81 <[EMAIL PROTECTED]> wrote: From: csabi81 <[EMAIL PROTECTED]> Subject: Re: [sqlite] Clone SQLite databases To: sqlite-users@sqlite.org Date:

Re: [sqlite] Realtime Backup of Database

2008-08-05 Thread Till Steinbach
Hi Ingo! Although I'm limited to C-Code your code would be really useful for me. The triggers will be the same for me. When I have the right triggers the most difficult part is done. The idea with the seperate table for logging is great. I have no idea yet how to log whole statements. I'm

[sqlite] Creating Indexes

2008-08-05 Thread Jeffrey Becker
I have a table 'SiteMap' defined as : Create Table SiteMap ( NodeID blob not null PRIMARY KEY, Title text NOT NULL UNIQUE, Url text NOT NULL ); I'd like to index on the node's parent value as defined by the expression ancestor(NodeID,1). 'ancestor' being a user defined

Re: [sqlite] Realtime Backup of Database

2008-08-05 Thread Alexey Pechnikov
Hello! I think you need to add callback function for insert operations and are logging in the function. Best regards, Alexey. ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] Realtime Backup of Database

2008-08-05 Thread sqliteuser
Till Steinbach wrote: > I don't get the right idea for my application. Something like > capturing the querys that update the database and transmit them to the > remote system would fit the purpose, but that seems to me very > complicated to teach the database. > You could write triggers

[sqlite] Using transactions gives SQLITE_ERROR

2008-08-05 Thread Yatin Salian
hi, I am currently using sqlite version 3.5.9 on WinCE 5.0. As per the posts in the forums I do understand that when a cursor is open on a connection we cannot update the database using transactions on the same thread. open cursor... begin transaction; update statements commit transaction.

Re: [sqlite] Clone SQLite databases

2008-08-05 Thread csabi81
Yes I have Indexes in original database, but I create them in the clone, useing the SQL obtained from mastertable, as well as the TRIGGERS. Stephen Woodbridge wrote: > > csabi81 wrote: >> Hi everyone >> >> I want to clone a database: copy all data from original database to the >> destination

Re: [sqlite] SQLite and updating VIEWs

2008-08-05 Thread Shawn Wilsher
Hey all, A month later, I have an updated plan for this with many more details. I'd really appreciate it if folks would take a look and point out any issues that you see. Here's my blog post explaining the current plan with extensive details: http://shawnwilsher.com/archives/169 Cheers, Shawn

[sqlite] Realtime Backup of Database

2008-08-05 Thread Till Steinbach
Hi everyone, i need to backup a sqlite database on a remote device for configuration redundancy purposes. Due to a really slow connection between the devices triggering rsync is not the best solution yet. Although rsync is efficient it is transfering kilobytes of data to see what it has to

[sqlite] Getting malformed database on windows ce device

2008-08-05 Thread Jardar Maatje
Hi I have a winodows CE device with a sd-flash card. The application is a collecting data from an application and to save power it goes to sleep as often as possible. Data is also collected at regular intervals (up to once every 2 minutes). The database is located on an SD-flash card. After a

Re: [sqlite] Clone SQLite databases

2008-08-05 Thread Stephen Woodbridge
csabi81 wrote: > Hi everyone > > I want to clone a database: copy all data from original database to the > destination database with a condition, so not all the entries need to be > copied. I have tried the following: > Obtain SQL from mastertable and create the tables in the new database, and >

Re: [sqlite] Clone SQLite databases

2008-08-05 Thread Derrell Lipman
On Tue, Aug 5, 2008 at 10:31 AM, csabi81 <[EMAIL PROTECTED]> wrote: > > I have made the test with following results: > Useing "SELECT ALL * FROM WHERE... order by id;" on the > original > database and > "SELECT ALL * FROM order by id;" on the cloned database give me > the same results. >

Re: [sqlite] Clone SQLite databases

2008-08-05 Thread csabi81
I have made the test with following results: Useing "SELECT ALL * FROM WHERE... order by id;" on the original database and "SELECT ALL * FROM order by id;" on the cloned database give me the same results. outputing the results from SELECT in different files give me two 100% identical files. I

Re: [sqlite] Clone SQLite databases

2008-08-05 Thread Ken
Doesnt seem like that much data. you could do a sanity check and select the row counts from each table and use the where clause on the original.   You could use the .output command selecting the data to different files (use an order by clause) then compare the two files.   HTH --- On Tue,

Re: [sqlite] Clone SQLite databases

2008-08-05 Thread csabi81
Thanks for Reply. I have tried VACUUM, nothing happens. The original database file remains the same size as before. What I create in the new database are Tables, Indexes and Triggers as well. I dont know if anything escapes from me. Mihai Limbasan wrote: > > csabi81 wrote: >> Hi everyone >>

Re: [sqlite] Clone SQLite databases

2008-08-05 Thread Mihai Limbasan
csabi81 wrote: > Hi everyone > > I want to clone a database: copy all data from original database to the > destination database with a condition, so not all the entries need to be > copied. I have tried the following: > Obtain SQL from mastertable and create the tables in the new database, and >

[sqlite] Clone SQLite databases

2008-08-05 Thread csabi81
Hi everyone I want to clone a database: copy all data from original database to the destination database with a condition, so not all the entries need to be copied. I have tried the following: Obtain SQL from mastertable and create the tables in the new database, and using INSERT to copy all

Re: [sqlite] FTS3: (1) cloning index rows? (2) not storing original text?

2008-08-05 Thread Scott Hess
On Mon, Aug 4, 2008 at 3:31 PM, yaroslavp <[EMAIL PROTECTED]> wrote: > After some searching I still could not find the answers to the following > questions. Any answers or pointers would be greatly appreciated. > > (1) In my FTS-enabled database, I want to clone some document, stored in a > binary