[sqlite] NFS SQLITE problem

2008-03-12 Thread William Emmanuel S. Yu
Hello, I am using a Beowulf Linux compute cluster to run my application. I store my data in SQLITE databases. My application needs to read various SQLITE files over a shared network over NFS. I have read a lot of NFS problems and SQLITE. I also know it is because NFS is broken somewhat. But, I a

Re: [sqlite] A few question using sqlite

2008-03-12 Thread Jay A. Kreibich
On Wed, Mar 12, 2008 at 11:50:57PM +0500, Zoltan Bencik scratched on the wall: > Hello all, > > I'm trying to enhance startup load and sorting in my application. In > order to speed up sorting I'm thinking of using sqlite. Since the data > I'm using gets sometimes in 10,000 rows, and using some li

[sqlite] Very large database

2008-03-12 Thread sswensen
Is there any reason why a database of >20GiB would have problems being opened with sqlite3_open_v2 or have issues with sqlite3_prepare_v2. I am running on a RHEL 5 x86_64 server. Accessing the database via the legacy open and prepare functions works fine as well as the exec function. The datab

Re: [sqlite] PHP Code That Can Store and Retrieve Images

2008-03-12 Thread RB Smissaert
Kees, Thanks for the interest in this and replied off-list. Bart -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Kees Nuyt Sent: 12 March 2008 22:06 To: General Discussion of SQLite Database Subject: Re: [sqlite] PHP Code That Can Store and Retrieve Imag

[sqlite] REPLACE INTO not increase field value?

2008-03-12 Thread zaher dirkey
REPLACE INTO States (Material, Name, Qnt) values (1, 'MyName', Qnt + 1) I want to increase value of Qnt if the record already exist and insert it with 1 value if not exist, the default value for Qnt is 1 and it is NOT NULL But the record done with these values (1, 'MyName, 1) Thanks in Advance -

Re: [sqlite] PHP 4 and SQLite3

2008-03-12 Thread Kees Nuyt
Hi Giovanni, On Wed, 12 Mar 2008 20:50:13 +0100, you wrote: >Hello >I must use SQLite functions of PHP 4, but it seems >that these functions doesn't works with SQLite 3. Indeed the sqlite_ functions in PHP 4 are SQLite 2 only. >What can I do? Use SQLite 2. Or find out if there is a SQLite3 c

Re: [sqlite] PHP Code That Can Store and Retrieve Images

2008-03-12 Thread Kees Nuyt
On Wed, 12 Mar 2008 18:44:36 -, Bart wrote: >Kees, > >Would you be interested to do a project for me for a fee? [..] >Regards, Bart Smissaert Answered in private mail. -- ( Kees Nuyt ) c[_] ___ sqlite-users mailing list sqlite-users@sqlite

Re: [sqlite] Inconsistency of Returned Field Names?

2008-03-12 Thread Kees Nuyt
On Wed, 12 Mar 2008 12:53:33 -0600 (MDT), you wrote: >I have noticed what appears to be an inconsistency of returned field >names. > >Two queries accessing the same field in the same table are returning >slightly different field names. I don't know if this is by design or by >accident and I'm sim

Re: [sqlite] Limiting the number of results from a query per group

2008-03-12 Thread Igor Tandetnik
Paul Hilton <[EMAIL PROTECTED]> wrote: > In the sqlite documentation under > http://www.sqlite.org/lang_select.html > it says: > "The limit is applied to the entire query not to the individual SELECT > statement to which it is attached." > > Why does that not apply to the 'Select *' in this query?

Re: [sqlite] Limiting the number of results from a query per group

2008-03-12 Thread Paul Hilton
-Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Igor Tandetnik Sent: Thursday, March 06, 2008 7:57 AM To: sqlite-users@sqlite.org Subject: Re: [sqlite] Limiting the number of results from a query per group "Paul Hilton" <[EMAIL PROTECTED]> wrote in message

Re: [sqlite] A few question using sqlite

2008-03-12 Thread Dennis Cote
Zoltan Bencik wrote: > Hello all, > > I'm trying to enhance startup load and sorting in my application. In > order to speed up sorting I'm thinking of using sqlite. Since the data > I'm using gets sometimes in 10,000 rows, and using some list control > for GUI, sorting by list columns gets a bit n

Re: [sqlite] Are callbacks re-entrant and can you setjmp/throw?

2008-03-12 Thread William Bardwell
> I am working on a language binding to SQLite, and I am trying to > figure out what features can safely be made available to untrusted > code. And I am trying to figure out if I can make > callbacks/handlers/authorizer safe for untrusted code, I suspect not. > So, is it safe to make normal SQLite

[sqlite] PHP 4 and SQLite3

2008-03-12 Thread [EMAIL PROTECTED]
Hello I must use SQLite functions of PHP 4, but it seems that these functions doesn't works with SQLite 3. What can I do? best regards Giovanni Rossati ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/list

Re: [sqlite] PHP Code That Can Store and Retrieve Images

2008-03-12 Thread Robert L Cochran
Ty wrote: > Robert L Cochran <[EMAIL PROTECTED]> writes: > > >> Is there open source PHP code (PHP 5.x compatible) that can store and >> retrieve images from an SQLite 3.5.6 database? >> >> > > Here's a quick example I came up with... it's using sqlite2 (I guess I have an > old version of

[sqlite] binding to parameters in PRAGMA statements doesn't work

2008-03-12 Thread William Bardwell
Although it is certainly not a critical thing, it would be nice if binding a table-name parameter in a PRAGMA statement worked. executing "PRAGMA table_info (?)" produces a SYNTAX error. William Bardwell [EMAIL PROTECTED] ___ sqlite-users mailing list sq

Re: [sqlite] PHP Code That Can Store and Retrieve Images

2008-03-12 Thread Ty
Robert L Cochran <[EMAIL PROTECTED]> writes: > > Is there open source PHP code (PHP 5.x compatible) that can store and > retrieve images from an SQLite 3.5.6 database? > Here's a quick example I came up with... it's using sqlite2 (I guess I have an old version of php or something like that :P),

Re: [sqlite] PHP Code That Can Store and Retrieve Images

2008-03-12 Thread Roosevelt Anderson
Good point Kees. I forgot about the serialize(). I don't used it because I use my sqlite db with PHP, .NET and VB6. But if the project is going to PHP only serialize() is the way to go. On Wed, Mar 12, 2008 at 2:38 PM, Kees Nuyt <[EMAIL PROTECTED]> wrote: > On Wed, 12 Mar 2008 09:10:44 -0400, you

Re: [sqlite] Database corruption

2008-03-12 Thread Kees Nuyt
On Wed, 12 Mar 2008 20:39:06 +0530, you wrote: >Hi, > >I am using the Sqlite for my server database application purpose. >I want to make sure that the database does not get corrupted. > >If by chance if i corrupts the database by what means can i restore it back? >From a backup. Sometimes the c

Re: [sqlite] SQL Blobs - what am i doing wrong here?(code inside)

2008-03-12 Thread C S
hey i wanted to thank Igor, Ron, Dennis and Matthew (sorry if i forgot anyone else) with helping me with this blob stuff. -cheers c.s. --- Igor Tandetnik <[EMAIL PROTECTED]> wrote: > C S <[EMAIL PROTECTED]> wrote: > > -so it seems that despite my byte order being > wrong?, > > i get the output ba

[sqlite] Inconsistency of Returned Field Names?

2008-03-12 Thread Lee Crain
I have noticed what appears to be an inconsistency of returned field names. Two queries accessing the same field in the same table are returning slightly different field names. I don't know if this is by design or by accident and I'm simply reporting what I see. _

[sqlite] A few question using sqlite

2008-03-12 Thread Zoltan Bencik
Hello all, I'm trying to enhance startup load and sorting in my application. In order to speed up sorting I'm thinking of using sqlite. Since the data I'm using gets sometimes in 10,000 rows, and using some list control for GUI, sorting by list columns gets a bit nasty and slow. I would like to ge

Re: [sqlite] PHP Code That Can Store and Retrieve Images

2008-03-12 Thread RB Smissaert
Kees, Would you be interested to do a project for me for a fee? I need to upload/download data to/from a hosted SQLite 3 DB. This has to be done from VBA or from a VB6 AX dll. I have posted this to RAC, but there seems little interest/progress. If interested then could you contact me off-list? I c

Re: [sqlite] PHP Code That Can Store and Retrieve Images

2008-03-12 Thread Kees Nuyt
On Wed, 12 Mar 2008 09:10:44 -0400, you wrote: >Here is a link to the PHP code to generate the base64 string and to convert >the string back to an image. > >http://fundisom.com/phparadise/php/image_handling/base64_image_encode > In PHP it might be better to serialize(). That works for every value

Re: [sqlite] Param Binding Problem

2008-03-12 Thread Mike Marshall
Thanks to Dan and Dennis for the heads up, all works great now Mike -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Dennis Cote Sent: 12 March 2008 17:12 To: General Discussion of SQLite Database Subject: Re: [sqlite] Param Binding Problem Mike Marshall

Re: [sqlite] Param Binding Problem

2008-03-12 Thread Dennis Cote
Mike Marshall wrote: > > acQuery = sqlite3_mprintf("SELECT rowid FROM fulltext_%s WHERE contents > MATCH '? '",sTempTableRoot.c_str()); You need to remove he quotes around the ? following MATCH. With the quotes it is a literal string containing a question mark. Without them it is a parameter in

Re: [sqlite] SQL Blobs - what am i doing wrong here?(code inside)

2008-03-12 Thread Igor Tandetnik
C S <[EMAIL PROTECTED]> wrote: > -so it seems that despite my byte order being wrong?, > i get the output back out exactly how i stored it in > the original array. There is nothing wrong with the byte order. It matches the native order of your CPU. > is there a problem here i should > be concern

Re: [sqlite] Param Binding Problem

2008-03-12 Thread Dan
On Mar 12, 2008, at 11:40 PM, Mike Marshall wrote: > Hi all > > > > I'm trying to get param binding working and I'm obviously doing > something > wrong > > > > My code is > > > > acQuery = sqlite3_mprintf("SELECT rowid FROM fulltext_%s WHERE > contents > MATCH '? '",sTempTableRoot.c_str());

Re: [sqlite] SQL Blobs - what am i doing wrong here?(code inside)

2008-03-12 Thread C S
Ron - this is my select statement: sqlite> select imageID, hex(imageData) from Images; 1|0300060009000C000F001200150018001B00 2|010002000300040005000600070008000900 3|010002000300040005000600070008000900 -sorry for the confusion i was just copying and pasting wrong. looks like ever

Re: [sqlite] SQL Blobs - what am i doing wrong here?(code inside)

2008-03-12 Thread C S
Igor, haha i JUST changed this before i checked your email to: while ((status = sqlite3_step(statement)) == SQLITE_ROW) { std::cout << "status is: " << status << std::endl; i++; if(i == 1) std::cout << "first row" << std::endl; else std::cou

Re: [sqlite] SQL Blobs - what am i doing wrong here?(code inside)

2008-03-12 Thread Igor Tandetnik
C S <[EMAIL PROTECTED]> wrote: > thanks for all your help too man. here is what is in > the table images so far when i do a select. its 3 > blobs: > > sqlite> select imageID, hex(imageData) from Images; > 1|00 0003 0006 0009 000C 000F 0012 0015 0018 001B 00 > 2|00 0001 0002 0003 0004 0005 0006 000

[sqlite] Param Binding Problem

2008-03-12 Thread Mike Marshall
Hi all I'm trying to get param binding working and I'm obviously doing something wrong My code is acQuery = sqlite3_mprintf("SELECT rowid FROM fulltext_%s WHERE contents MATCH '? '",sTempTableRoot.c_str()); nError = sqlite3_prepare_v2(m_pHandle,acQuery,-1,&pStatement,NULL); n

Re: [sqlite] SQL Blobs - what am i doing wrong here?(code inside)

2008-03-12 Thread Wilson, Ron P
you are delimiting your dwords wrong. reverse the byte order. this resolves your leading and trailing 00 problem. sqlite> select imageID, hex(imageData) from Images; 1| 0300 0600 0900 0C00 0F00 1200 1500 1800 1B00 2| 0100 0200 0300 0400 0500 0600 0700 0800 0900 3| 0100 0200 0300 0400

Re: [sqlite] SQL Blobs - what am i doing wrong here?(code inside)

2008-03-12 Thread C S
replying to my own message - update should my myString2 - that is not an actual error, just copied and pasted it wrong. also i noticed a problem with i in my final for loop. i changed it to j since i was being incremented. i still get the same output however. just to clarify. --- C S <[EMAIL PR

Re: [sqlite] SQL Blobs - what am i doing wrong here?(code inside)

2008-03-12 Thread C S
Igor, thanks for all your help too man. here is what is in the table images so far when i do a select. its 3 blobs: sqlite> select imageID, hex(imageData) from Images; 1|00 0003 0006 0009 000C 000F 0012 0015 0018 001B 00 2|00 0001 0002 0003 0004 0005 0006 0007 0008 0009 00 3|00 0001 0002 0003 0

Re: [sqlite] Two Phase commit using sqlite (Ken)

2008-03-12 Thread Ken
Shailesh, Sqlite does not have a 2 phase commit mechanism across hosts. In fact there is no way in sqlite currently to perform a transaction against two db's on two seperate hosts (unless of course the db's are on a shared filesystem). 1. Put the db's on a shared filesystem. In that case you'll

Re: [sqlite] Why doesn't "where =" work for text field

2008-03-12 Thread Igor Tandetnik
[EMAIL PROTECTED] wrote: >> What about this: > >> select name, length(name), hex(name) >> from PerfTest1 >> where name like '%key5000%'; > >> hex(name) should dump raw bytes, in hexadecimal, stored in name >> column. See if there's anything unusual (perhaps a trailing NUL >> byte?) > > Returns: 'k

[sqlite] Why doesn't "where =" work for text field

2008-03-12 Thread jkimble
>Does the value of the field really contain the single quotation marks, as >opposed to being just a delimiter? That would explain it. > >Brad It appears I am stupid (hopefully not contagious)... Select * from PerfTable1 where name = '''key5000'''; Works. I thought "'" were delimiters

Re: [sqlite] Why doesn't "where =" work for text field

2008-03-12 Thread Brad Stiles
[EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: >> select name, length(name), hex(name) >> from PerfTest1 >> where name like '%key5000%'; > Returns: 'key5000'|9|276B65793530303027 Does the value of the field really contain the single quotation marks, as opposed to being just a delimiter? That wo

Re: [sqlite] SQL Blobs - what am i doing wrong here?(code inside)

2008-03-12 Thread Wilson, Ron P
spaces added for clarification: 1| 0100 0200 0300 0400 0500 0600 0700 0800 0900 Ron Wilson, S/W Systems Engineer III, Tyco Electronics, 434.455.6453 -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of C S Sent: Wednesday, March 12, 2008 10:48 AM To: Gen

[sqlite] Database corruption

2008-03-12 Thread Sreedhar.a
Hi, I am using the Sqlite for my server database application purpose. I want to make sure that the database does not get corrupted. If by chance if i corrupts the database by what means can i restore it back? What are the various possibilities of database corrupting methods in sqlite? so that

[sqlite] Why doesn't "where =" work for text field

2008-03-12 Thread jkimble
>What about this: >select name, length(name), hex(name) >from PerfTest1 >where name like '%key5000%'; >hex(name) should dump raw bytes, in hexadecimal, stored in name column. >See if there's anything unusual (perhaps a trailing NUL byte?) Returns: 'key5000'|9|276B65793530303027 Nothing weird

Re: [sqlite] SQL Blobs - what am i doing wrong here?(code inside)

2008-03-12 Thread Igor Tandetnik
C S <[EMAIL PROTECTED]> wrote: > thanks for the tip on the hex. now i can see my > entry of the blob. my original loop to fill the > dynamic array with unsigned shorts was this: > > imageArray = new unsigned short[10]; > > for(int i = 0; i < 10; i++) > imageArray[i] = i; > > so now if i run the p

Re: [sqlite] Why doesn't "where =" work for text field

2008-03-12 Thread Igor Tandetnik
[EMAIL PROTECTED] wrote: >> See if this statement returns any rows. Any whitespace should be >> clearly visible: > >> select '!' || name || '!' from PerfTest1 >> where name != trim(name); > > 0 rows so it's not spaces. What about this: select name, length(name), hex(name) from PerfTest1 where nam

[sqlite] Why doesn't "where =" work for text field

2008-03-12 Thread jkimble
>> Simple select and I cannot make it work: >> >>Select name from PerfTest1 where name = trim('key5000'); >Since 'key5000' doesn't have any leading or trailing spaces, applying >trim() to it is pointless. Did you perhaps mean trim(name) = 'key5000' ? Sorry, typo. I was doing trim(name)

[sqlite] sqlite3.def and sqlite3 functions

2008-03-12 Thread Predrag Parmakovic
Hello, I have a one question. While sqlite3.def file doesn't have the next sqlite3 function: sqlite3_column_database_name sqlite3_column_database_name16 sqlite3_column_table_name sqlite3_column_table_name16 sqlite3_column_origin_name sqlite3_column_origin_name16 I have downloaded sqlite3.def fr

Re: [sqlite] SQL Blobs - what am i doing wrong here?(code inside)

2008-03-12 Thread C S
Dennis, thanks for the tip on the hex. now i can see my entry of the blob. my original loop to fill the dynamic array with unsigned shorts was this: imageArray = new unsigned short[10]; for(int i = 0; i < 10; i++) imageArray[i] = i; so now if i run the program then do a: select imageID, hex

Re: [sqlite] Why doesn't "where =" work for text field

2008-03-12 Thread Dennis Cote
[EMAIL PROTECTED] wrote: > > Simple select and I cannot make it work: > > Select name from PerfTest1 where name = trim('key5000'); > Since the string literal 'key5000' doesn't contain leading or trailing spaces, there is nothing for the trim function to remove. The result of the trim func

Re: [sqlite] Why doesn't "where =" work for text field

2008-03-12 Thread Igor Tandetnik
[EMAIL PROTECTED] wrote: > Simple select and I cannot make it work: > >Select name from PerfTest1 where name = trim('key5000'); Since 'key5000' doesn't have any leading or trailing spaces, applying trim() to it is pointless. Did you perhaps mean trim(name) = 'key5000' ? > This works: > >

Re: [sqlite] SQL Blobs - what am i doing wrong here?(code inside)

2008-03-12 Thread C S
replying to my own message - i added the step function that i needed...so: sqlite_step(statement), in between the bind and finalize.. i deleted all the entries from the table so i could start over, so when i do a select on Images i get: 1| so either somehow i cant see the contents of the blob o

Re: [sqlite] SQL Blobs - what am i doing wrong here?(code inside)

2008-03-12 Thread Dennis Cote
C S wrote: > > i get nothing. i have a printout statement to make > sure an imageID was created and it was successfully. > the array is indeed dynamic and has to be. to echo > this is what i have: > > myString = "insert into Images(imageID, imageData) > values(?, ?); > > status = sqlite3_prepare

Re: [sqlite] SQL Blobs - what am i doing wrong here?(code inside)

2008-03-12 Thread Igor Tandetnik
C S <[EMAIL PROTECTED]> wrote: > myString = "insert into Images(imageID, imageData) > values(?, ?); > > status = sqlite3_prepare_v2(db, myString.c_str(), -1, > &statement, NULL); > > void *blob = reinterpretcast(imageArray); > > status = sqlite3_bind_blob(statement, 2, blob, 10 * > sizeof(unsigned

Re: [sqlite] SQL Blobs - what am i doing wrong here?(code inside)

2008-03-12 Thread C S
Dennis mentioned before that it was not necessary to do a bind on something that was defined as an integer primary key. when i do: select * from Images; 1| 2| thats pretty much it. there are two entries because i tried to pure void cast as the previous message suggest vs the char * way..and it

Re: [sqlite] SQL Blobs - what am i doing wrong here?(code inside)

2008-03-12 Thread Matthew L. Creech
On Wed, Mar 12, 2008 at 9:37 AM, C S <[EMAIL PROTECTED]> wrote: > > myString = "insert into Images(imageID, imageData) > values(?, ?); > > > status = sqlite3_prepare_v2(db, myString.c_str(), -1, > &statement, NULL); > > void *blob = reinterpretcast(imageArray); > > > status = sqlite3_bind_blo

Re: [sqlite] SQL Blobs - what am i doing wrong here?(code inside)

2008-03-12 Thread Wilson, Ron P
void *blob = reinterpretcast(imageArray); void *blob = reinterpretcast(imageArray); Ron Wilson, S/W Systems Engineer III, Tyco Electronics, 434.455.6453 -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of C S Sent: Wednesday, March 12, 2008 9:37 AM To: General

Re: [sqlite] SQL Blobs - what am i doing wrong here?(code inside)

2008-03-12 Thread C S
Dennis, thanks for your and everyone elses help with this problem. i actually did everything you said here and the program executed without any errors. i re-created the table to what you said as now so it is blob now instead of text. i get nothing. i have a printout statement to make sure a

Re: [sqlite] PHP Code That Can Store and Retrieve Images

2008-03-12 Thread Roosevelt Anderson
Here is a link to the PHP code to generate the base64 string and to convert the string back to an image. http://fundisom.com/phparadise/php/image_handling/base64_image_encode On Wed, Mar 12, 2008 at 8:56 AM, <[EMAIL PROTECTED]> wrote: > I am not actually dealing with images, but normal > text

[sqlite] Why doesn't "where =" work for text field

2008-03-12 Thread jkimble
Simple select and I cannot make it work: Select name from PerfTest1 where name = trim('key5000'); This works: Select name from PerfTest1 where name like '%key5000%'; I don't see any spaces in the text field. Do you ALWAYS have to use a LIKE to get a match for TEXT strings? If not, wha

Re: [sqlite] PHP Code That Can Store and Retrieve Images

2008-03-12 Thread bartsmissaert
I am not actually dealing with images, but normal text and integer data. Got one reply now from RAC, so will see what comes from it. RBS > The easiest way to store an image would be to first convert the image to > base64 and store the base64 text to the database. Converting data to > base64 > t

Re: [sqlite] PHP Code That Can Store and Retrieve Images

2008-03-12 Thread Roosevelt Anderson
The easiest way to store an image would be to first convert the image to base64 and store the base64 text to the database. Converting data to base64 takes up about 33% more space than the original data. On Tue, Mar 11, 2008 at 6:22 PM, RB Smissaert < [EMAIL PROTECTED]> wrote: > Funny you ask that

Re: [sqlite] [C] Problem getting int results

2008-03-12 Thread Severin Müller
Hello Thanks for ypur help. I achieved what i wanted. I found out that didn't have to bind the result. I just userd result = sqlite3_column_int to get my result. I also had to drop the quotes to make it work properly. Thanks a lot :-) Original-Nachricht > Datum: Wed, 12

Re: [sqlite] corrupt db vacuums clean on 3.2.7 but not 3.5.4 or 3.5.6

2008-03-12 Thread Josh Gibbs
Luca Olivetti wrote: > En/na Josh Gibbs ha escrit: > >> Hi there, >> >> We are having some problem with DB corruption occurring >> using 3.5.4. I don't know the source of the corruption, however >> after extensive testing and updating to 3.5.6 in the hope of getting >> some resolution to our pr

Re: [sqlite] [C] Problem getting int results

2008-03-12 Thread Igor Tandetnik
""Severin Müller"" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] >> ""Severin Müller"" <[EMAIL PROTECTED]> >> wrote in message >> news:[EMAIL PROTECTED] >>> int func(void) >>> { >>> // database is open and the select statement is executed >>> // this is the query: char

Re: [sqlite] corrupt db vacuums clean on 3.2.7 but not 3.5.4 or 3.5.6

2008-03-12 Thread Luca Olivetti
En/na Josh Gibbs ha escrit: > Hi there, > > We are having some problem with DB corruption occurring > using 3.5.4. I don't know the source of the corruption, however > after extensive testing and updating to 3.5.6 in the hope of getting > some resolution to our problems I accidentally ran an olde

Re: [sqlite] [C] Problem getting int results

2008-03-12 Thread Severin Müller
> ""Severin Müller"" <[EMAIL PROTECTED]> wrote > in message news:[EMAIL PROTECTED] > > int func(void) > > { > > // database is open and the select statement is executed > > // this is the query: char *sql = "SELECT 'protect' FROM > > 'test_db');"; > > This is not valid SQL. FROM

Re: [sqlite] [C] Problem getting int results

2008-03-12 Thread Igor Tandetnik
""Severin Müller"" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > int func(void) > { > // database is open and the select statement is executed > // this is the query: char *sql = "SELECT 'protect' FROM > 'test_db');"; This is not valid SQL. FROM clause expects a tab

Re: [sqlite] [3.5.4] Why doesn't filesize change?

2008-03-12 Thread Gilles Ganault
On Wed, 12 Mar 2008 03:32:06 -0700, "Cory Nelson" <[EMAIL PROTECTED]> wrote: >SQLite allocates space in pages. If an insert doesn't require >allocating a new page, the file size won't grow. Good to know. Thanks. ___ sqlite-users mailing list sqlite-use

Re: [sqlite] [3.5.4] Why doesn't filesize change?

2008-03-12 Thread Cory Nelson
On Wed, Mar 12, 2008 at 3:03 AM, Gilles Ganault <[EMAIL PROTECTED]> wrote: > Hello > > Out of curiosity, is it normal that the size of an SQLite file doesn't > change even when adding stuff to it, as reported by "ls" in Linux? > > Does SQLite use some kind of clusters, ie. pre-reserved space, wh

[sqlite] [3.5.4] Why doesn't filesize change?

2008-03-12 Thread Gilles Ganault
Hello Out of curiosity, is it normal that the size of an SQLite file doesn't change even when adding stuff to it, as reported by "ls" in Linux? Does SQLite use some kind of clusters, ie. pre-reserved space, which would explain this? Thank you. ___ sql

[sqlite] SQLite and (high) concurrency

2008-03-12 Thread Tore Austraatt
Ken & John, thank you very much indeed! That did the trick - so we could perhaps say that IGNORE safely can be ignored... Thanks also for heading me in the right direction regarding transactions, and guess what - all this cut loose several kilos of code. But perhaps the most importent effect

[sqlite] [C] Problem getting int results

2008-03-12 Thread Severin Müller
Hello Folks I have some problem retrieving a result from a sqlite database in C. I have the following statement: int func(void) { // database is open and the select statement is executed // this is the query: char *sql = "SELECT 'protect' FROM 'test_db');"; struct sqlit