[sqlite] locking, unlocking issues ...

2006-06-22 Thread Fred a
Hello all, My use case is: I open the db, create the table, insert some records, after i try to select some record and sqlite3 return SQLITE_CORRUPT (error 11). If i close the db before SELECT it run... I see some about locking/unlocking issues... but i don t know how i can resolve that

[sqlite] MONO Mono.Data.SqliteClient sources

2006-06-22 Thread Clinco, Michele
Hallo. I'm using the Finsair ADO.Net wrapper with .Net Framework 1.1 As erported by several of us, this driver is giving some 'call out of sequence' problems that are not fixed because the team that made this driver seems not work any more on it (last version is of more that 1 year ago) It was

Re: [sqlite] compiling sqlite

2006-06-22 Thread Nuno Lucas
On 6/21/06, Robin Cook <[EMAIL PROTECTED]> wrote: Tried to compile 2.8.16 but got the below errors. Any suggestions? Thanks. C:\Windows CE Tools\wce211\PDT7200\Samples\sqlite\btree_rb.c(314) : warning C4013: 'printf' undefined; assuming extern returning int This is unused debug code. You can

Re: [sqlite] MONO Mono.Data.SqliteClient sources

2006-06-22 Thread Gerhard Häring
Clinco, Michele wrote: [...] the ADO.Net driver available in MONO is working fine, so I'm thinking about a migration. The only problem is that I could not find the source code in the mono-project site and I was not able to find, between the different mirrors available in internet, the

Re: [sqlite] Delete performance vs. Insert performance

2006-06-22 Thread Insun Kang
Ah! I found my fault in the test code. The delete performance was measured incorrectly, so I re-examed the performance. It still shows outstanding performance compared to insert performance, but it is a reasonable gap. [Cache: 1MB ] Delete 1000recs/3000recs : 2.6 secs . Insert 2000recs :

Re: [sqlite] suggesiton needed for using SQL lite in a situation

2006-06-22 Thread C.Peachment
On Thu, 22 Jun 2006 12:59:54 +0530, Puneet Goel wrote: >I am considering using SQL Lite for my purpose. For that i need some help in >decision making. I have an applivation which nneds to store muliple number >of messages for a user. Messages will grow over time. Also there can be >thousands of

Re: [sqlite] suggesiton needed for using SQL lite in a situation

2006-06-22 Thread Mikey C
One things to bear in mind is will you need to query data across all users? Perhaps a report or some stats for all users? If so, this is much more problematic if you have one DB per user, since you would need to ATTACH all the separate files to enable the query to work. A single DB file, such

[sqlite] Is this query correct?

2006-06-22 Thread Mikey C
select avg((select 100 union select 200)) Returns 100 I would have expected 150? Am I being thick or is it a bug? -- View this message in context: http://www.nabble.com/Is-this-query-correct--t1829679.html#a4991615 Sent from the SQLite forum at Nabble.com.

Re: [sqlite] Delete performance vs. Insert performance

2006-06-22 Thread Christian Smith
Jay Sprenkle uttered: On 6/21/06, Christian Smith <[EMAIL PROTECTED]> Adding to the free list will touch each page at most once, and thus caching adds no benefit (and has no loss for a smaller cache.) Inserting may touch each page multiple times, for such operations as rebalancing the tree.

Re: [sqlite] Re: Re: Opening the database file for read on Windows XP

2006-06-22 Thread Christian Smith
Igor Tandetnik uttered: Christian Smith <[EMAIL PROTECTED]> wrote: Igor Tandetnik uttered: You want to enable sharing. Pass FILE_SHARE_READ | FILE_SHARE_WRITE as the third parameter. Surely not FILE_SHARE_WRITE! You don't want other processes writing the database while you're copying it.

Re: [sqlite] suggesiton needed for using SQL lite in a situation

2006-06-22 Thread Peter Cunderlik
1) I make 1 DB having data for so many users. 2) I make seperate DB for each user Second approach implies that you'd have to do your own database files (users) management when adding/removing users. It also means you have'd have several database files to keep, so the simplicity of handling

Re: [sqlite] suggesiton needed for using SQL lite in a situation

2006-06-22 Thread Puneet Goel
Hi C and Michey, Thx for the informative comments. Let me be little more specific. I need to to make a databse system where i can store SMS/MMS coming from network for all users. Later on the SMS/MMS will be forwarded to the specific user. On 6/22/06, C.Peachment <[EMAIL PROTECTED]> wrote: An

Re: [sqlite] suggesiton needed for using SQL lite in a situation

2006-06-22 Thread C.Peachment
On Thu, 22 Jun 2006 18:48:08 +0530, Puneet Goel wrote: >that there can be multiple incoming SMS/MMS for >different users at the same time. Also there can be multiple reads too all >at the same time. Frequency may be high considering there might be thousands >of users. >> >> >> Open/close of

Re: [sqlite] Delete performance vs. Insert performance

2006-06-22 Thread Dennis Cote
Insun Kang wrote: The machine is iPAQ h5550 (CPU speed is about 400MHz). Cache size = 500 pages * 2KB = 1MB Cache size = 50 pages * 2KB = 100KB Cache size = 25 pages * 2KB = 50KB The test code is written in c code and the flow is like this. - The data table has 11 columns and 5 single-column

Re: [sqlite] Is this query correct?

2006-06-22 Thread Dennis Cote
Mikey C wrote: select avg((select 100 union select 200)) Returns 100 I would have expected 150? Am I being thick or is it a bug? Mikey, Try this instead: select avg(n) from (select 100 as n union select 200 as n); You are passing a table to avg (and it ignored all but the first

Re: [sqlite] Re: Re: Opening the database file for read on Windows XP

2006-06-22 Thread Ran
Actually, I have just realized that I indeed cannot use BEGIN IMMEDIATE to do the locking because it has to be locked from the process that has no SQLite in it... And you already delievered the exact answer of how to do it! Thanks a lot! Ran On 6/22/06, Christian Smith <[EMAIL PROTECTED]>

[sqlite] Very blocking problem... please help me

2006-06-22 Thread Fred a
Hello all, Excuse me i re-post my message because it's a very blocking problem for me... My use case is: I open a new db, create the table, insert some records, after i try to select (without closing db before SELECT query) some record and sqlite3 return SQLITE_CORRUPT (error 11) . (If i

Re: [sqlite] Very blocking problem... please help me

2006-06-22 Thread Dennis Cote
Fred a wrote: My use case is: I open a new db, create the table, insert some records, after i try to select (without closing db before SELECT query) some record and sqlite3 return SQLITE_CORRUPT (error 11) . (If i close the db before SELECT it run...) I try with BEGIN IMMEDIATE and COMMIT

[sqlite] Count and Display

2006-06-22 Thread andrew gatt
I'm trying to work out the most efficient way of performing a query. What i want is for the rest of the database starting at a certain letter, and ordered alphabetically. So for example this command: SELECT name FROM people WHERE name > 'C%' ORDER BY people however i need to apply a limit and

Re: [sqlite] Very blocking problem... please help me

2006-06-22 Thread drh
Fred a <[EMAIL PROTECTED]> wrote: > > I open a new db, create the table, insert some records, after i try to select > (without closing db before SELECT query) some record and sqlite3 return > SQLITE_CORRUPT (error 11) . (If i close the db before SELECT it run...) > I try with BEGIN IMMEDIATE

Re: [sqlite] Count and Display

2006-06-22 Thread Dennis Cote
andrew gatt wrote: I'm trying to work out the most efficient way of performing a query. What i want is for the rest of the database starting at a certain letter, and ordered alphabetically. So for example this command: SELECT name FROM people WHERE name > 'C%' ORDER BY people however i need

Re: [sqlite] Count and Display

2006-06-22 Thread Dennis Cote
andrew gatt wrote: P.S. Is it me or is there no way to do case insenstive commands? Andrew, If you are asking about case insensitive name comparisons, then there is a way. You must declare the name column in your table to use the NOCASE collation. create table people ( name

Re: [sqlite] Count and Display

2006-06-22 Thread andrew gatt
Thanks for your reply, yes i can use the limit clause but it would help me greatly if i could also get the offset out of the query. So i can then calculate the next offset and limit. For example: Name Anna Bob Carl Dan Fred the > 'C%' query gives: Carl Dan Fred which as you've pointed out can

Re: [sqlite] Count and Display

2006-06-22 Thread Dennis Cote
andrew gatt wrote: Thanks for your reply, yes i can use the limit clause but it would help me greatly if i could also get the offset out of the query. So i can then calculate the next offset and limit. For example: Name Anna Bob Carl Dan Fred the > 'C%' query gives: Carl Dan Fred which as

[sqlite] Re: Count and Display

2006-06-22 Thread Igor Tandetnik
andrew gatt <[EMAIL PROTECTED]> wrote: I'm trying to work out the most efficient way of performing a query. What i want is for the rest of the database starting at a certain letter, and ordered alphabetically. So for example this command: SELECT name FROM people WHERE name > 'C%' ORDER BY

Re: [sqlite] Count and Display

2006-06-22 Thread Jay Sprenkle
On 6/22/06, andrew gatt <[EMAIL PROTECTED]> wrote: Thanks for your reply, yes i can use the limit clause but it would help me greatly if i could also get the offset out of the query. So i can then calculate the next offset and limit. For example: Doing a list box of results? I've found users

[sqlite] Re : [sqlite] Very blocking problem... please help me

2006-06-22 Thread Fred a
Hi, Thank you for your answer... You try to reproduce on win32 or linux ? I think, may be, i have a bug on my porting layer (lock file / unlock file)... But without this problem context, can i : - open a (new) database - insert some records - (don t close db) - select field

Re: [sqlite] Delete performance vs. Insert performance

2006-06-22 Thread John Stanton
Dennis Cote wrote: Insun Kang wrote: The machine is iPAQ h5550 (CPU speed is about 400MHz). Cache size = 500 pages * 2KB = 1MB Cache size = 50 pages * 2KB = 100KB Cache size = 25 pages * 2KB = 50KB The test code is written in c code and the flow is like this. - The data table has 11 columns

Re: [sqlite] Re : [sqlite] Very blocking problem... please help me

2006-06-22 Thread C.Peachment
On Thu, 22 Jun 2006 19:14:35 + (GMT), Fred a wrote: >But without this problem context, can i : >- open a (new) database >- insert some records >- (don t close db) >- select field >...? You can test this requirement using the sqlite3 command line utility. There is a tutorial

[sqlite] Looking for sqlite3.h header file

2006-06-22 Thread sassanp
Hi, I'm trying to use the SQLite dll (Windows platform) and apparently need to include the sqlite3.h header file. It wasn't included in either the sqlitedll-3_3_6.zip file containing the DLL nor the sqlite-3.3.6.tar.gz containing the source code. I couldn't find it on the on-line CVS repository

Re: [sqlite] Looking for sqlite3.h header file

2006-06-22 Thread Will Leshner
On 6/22/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: I'd be grateful if someone could tell me where to look for it (or send me a copy), or if that's even the right file to use with the DLL. I believe it is generated during make, which is why you probably can't find it. But I believe it is

Re: [sqlite] SQLite performance for 10 Million Records

2006-06-22 Thread Manzoor Ilahi Tamimy
I have tested my Code with the following PRAGMA and still not getting any change in time. //-- sqlite3_exec(db, "PRAGMA temp_store=2", NULL, NULL, NULL); sqlite3_exec(db, "PRAGMA synchronous=0", NULL, NULL, NULL); sqlite3_exec(db,

Re: [sqlite] How to port SQLite to a uc/os-II OS with customized file system?

2006-06-22 Thread Sarah
Thank you for your advice. If I skip the functionality of file locking, that is to say, in my project, I do not need to use the functionality of file locking, then which approach will be easier for me to wrap my self-defined file system to a set of standard interfaces? One is to wrap it

[sqlite] sqlite dbmail

2006-06-22 Thread DK
Hello, I don't know if this is even news to you probably not, dbmail ships now with an sqlite back end option. I really like the idea of using sqlite as the backend but I am trying to get them to make a modification so I took it on my self to do the research for it to make it easier on them if