[sqlite] function to intialize the structure member

2007-09-06 Thread nishit sharma
Hi All, can anybody tell me which function in sqlite3 can help me in initializing the structure member by reading the values from database. currently i m using sqlite3_exec() function to read the values from database and calling callback function to display the values. can i initialize structure

Re: [sqlite] Multi-User confusion

2007-09-06 Thread Joe Wilson
--- Jeff Godfrey <[EMAIL PROTECTED]> wrote: > Thanks for the pointer. I should have mentioned, my application is > running under Windows (Win2000 and WinXP). A quick look at the > mentioned code makes me believe that it targets Unix-only systems > (though there are a few brief mentions of

Re: [sqlite] Multi-User confusion

2007-09-06 Thread Jeff Godfrey
Joe Wilson wrote: --- Jeff Godfrey <[EMAIL PROTECTED]> wrote: Can you (or anyone else) point me to some web-based information? http://www.sqlite.org/cvstrac/fileview?f=sqlite/src/os_unix.c=1.165 Joe, Thanks for the pointer. I should have mentioned, my application is running

Re: [sqlite] Multi-User confusion

2007-09-06 Thread Joe Wilson
--- Jeff Godfrey <[EMAIL PROTECTED]> wrote: > Joe Wilson wrote: > > If your database storage device cannot guarantee an exclusive file > > lock, then any database write can potentially result in corruption. > > > > If you control all SQLite clients' code, you could recompile sqlite > > to use the

Re: [sqlite] Multi-User confusion

2007-09-06 Thread Jeff Godfrey
[EMAIL PROTECTED] wrote: You may have a look at the dhRCPServer at: http://www.thecommon.net/2.html I am not using it, but it sounds it may do the job. RBS Bart, Thanks for the pointer. It does sound quite interesting, though I don't know if it can (easily?) be used from within a

Re: [sqlite] Multi-User confusion

2007-09-06 Thread Jeff Godfrey
Joe Wilson wrote: If your database storage device cannot guarantee an exclusive file lock, then any database write can potentially result in corruption. If you control all SQLite clients' code, you could recompile sqlite to use the file-based dotlockLockingStyle convention via

Re: [sqlite] SQL approach to Import only new items, delete other items

2007-09-06 Thread Scott Hess
You could invert your solution. Create a temporary table which contains all of the existing keys, and every time you insert a new item, delete that item's key from the temporary table. At the end, do something like 'DELETE FROM main_table WHERE key IN (SELECT key FROM tmp_table)'. -scott On

Re: [sqlite] Multi-User confusion

2007-09-06 Thread Joe Wilson
If your database storage device cannot guarantee an exclusive file lock, then any database write can potentially result in corruption. If you control all SQLite clients' code, you could recompile sqlite to use the file-based dotlockLockingStyle convention via -DSQLITE_ENABLE_LOCKING_STYLE=1

RE: [sqlite] SQL approach to Import only new items, delete other items

2007-09-06 Thread Tom Briggs
> Because my concern is this, I don't know how SQLite will do > > Delete from table where col not in (select from large temp dataset) > > How the delete will actually be walked, if it will create a serverside > cursor and walk the values in the in statement then it will > be fine and > fast,

RE: [sqlite] SQL approach to Import only new items, delete other items

2007-09-06 Thread Andre du Plessis
Thank you for the suggestion, Im about to set up a test as soon as I have the time where I want to create a test table and populate it with a high number of rows, then perform an update to a temp table, and then delete with an in statement Because my concern is this, I don't know how SQLite will

RE: [sqlite] SQL approach to Import only new items, delete other items

2007-09-06 Thread Tom Briggs
Your suggested temp table approach is how I would solve this; if everything is properly indexed it won't be too bad. Even if it is bad, it'll be better than updating columns within the table and then deleting rows based on that. Another potential alternative is to: 1. Load all new

[sqlite] Patch for lemon issue #2550

2007-09-06 Thread Vincent Zweije
Hi all, Please find attached a patch for ticket 2550: "Lemon parser may accept input before EOF is seen." I'm sending it to the list as I do not seem able to pass the abbreviated Turing test that guards attaching stuff to the ticket. :( It appears to work over here where several lemon generated

[sqlite] SQL approach to Import only new items, delete other items

2007-09-06 Thread Andre du Plessis
Im importing data The data has a unique value, call it MD5 for now that could be a unique value for the data. Each record that gets imported is converted to MD5, a lookup is done on the table for that MD5, if found it must leave it alone, if not found it must insert a new record... All