[sqlite] How to set up sqlite3 with Dev C++

2007-07-30 Thread Stephen Sutherland
Hi; I'm pretty much a newbie. I'm just about finishing a PC a game with Dev C++. I decided to use sqlite3 to load content from XML repository (for user write access) into the database and then sort and pull out the appropriate information as needed. However, I am trying to figure out SET UP

Re: [sqlite] Re: [3.3.13] UPDATE OR ROLLBACK?

2007-07-30 Thread Gilles Ganault
At 23:20 30/07/2007 -0400, Igor Tandetnik wrote: http://sqlite.org/capi3ref.html#sqlite3_changes Makes sense. Thanks! - To unsubscribe, send email to [EMAIL PROTECTED]

Re: [sqlite] strategy adding indexes

2007-07-30 Thread Bharath Booshan L
Hi Tom, I have one more query regarding usage of indexes. > 2. From left to right in the same order as your index. So if you > create index MyIndex on MyTable ( Column1, Column2, Column3 ), then > you must test them in the same order, eg: where Column1 = Value1 and > Column2 = Value2 or

RE: [sqlite] strategy adding indexes

2007-07-30 Thread RB Smissaert
Hi Tom, Thanks for that; useful to know. Didn't know about point 1 and 2 and that will complicate matters a bit further. RBS -Original Message- From: T [mailto:[EMAIL PROTECTED] Sent: 31 July 2007 00:39 To: sqlite-users@sqlite.org Subject: Re: [sqlite] strategy adding indexes Hi RBS,

[sqlite] Re: [3.3.13] UPDATE OR ROLLBACK?

2007-07-30 Thread Igor Tandetnik
Gilles Ganault wrote: I'd like to use a timestamp column in each table to keep track of when a column was last updated, so that a user can be notified of a problem when trying to updated a record that has already been updated by another user while the first user was still working on the

[sqlite] [3.3.13] UPDATE OR ROLLBACK?

2007-07-30 Thread Gilles Ganault
Hello I'd like to use a timestamp column in each table to keep track of when a column was last updated, so that a user can be notified of a problem when trying to updated a record that has already been updated by another user while the first user was still working on the original data. In

Re: [sqlite] how to cout the nandflash expire

2007-07-30 Thread [EMAIL PROTECTED]
Tank you very much, I know that all of the sqlite's operates will be parsed to vdbe code, but i don't know how can i get the map of vdbe code to file operate. Ben Combee wrote: > > On 7/30/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: >> >> hello, I port the sqlite3 to linux(file system

[sqlite] Bitwise 'AND' issue with bound variables

2007-07-30 Thread Kervin L. Pierre
Hello, I'd been looking into a bug in my application which worked down to an issue with Bitwise AND and bound variables in prepared statements it seems. The query... SELECT * FROM example WHERE (intColumn & 4294901760) = ? Where 'intColumn' is an integer column and the parameter is bound using

Re: [sqlite] CREATE INDEX that is case insensitive?

2007-07-30 Thread John Stanton
Lower case and upper case are different, with lower case having the higher vlaue. To get case insensitive sorts do this: CREATE TABLE mytab (a TEXT COLLATE NOCASE); then SELECT a FROM mytab ODRER BY a; will give a case insensitive sorted list. Chase wrote: ok. here's a SELECT that

Re: [sqlite] strategy adding indexes

2007-07-30 Thread T
Hi RBS, - indexes that include all possible combinations of fields that may appear in a WHERE clause. As an aside, note that, AFAIK, indexes are only used: 1. To get the first match of a query. If you ask for more than one matching record, the second, third etc matches are found by

[sqlite] Re: How to know which rows are affected by UPDATE/DELETE?

2007-07-30 Thread Igor Tandetnik
John Stanton <[EMAIL PROTECTED]> wrote: You should take a closer look at the structure of Sqlite, in particular how it uses pages. It is not amenable to your row locking strategy. Optimistic locking doesn't lock anything per se. It's a download-modify-upload cycle where the "upload" part

Re: [sqlite] CREATE INDEX that is case insensitive?

2007-07-30 Thread Trevor Talbot
On 7/30/07, Chase <[EMAIL PROTECTED]> wrote: > Right now, when i do a select in sqlite that is supposed to be in > alphabetical order, i get: > > DC > Da > De > Do > We ultimately will be creating an index for this column anyway, so > let's just jump ahead and talk about creating an INDEX which

Re: [sqlite] Changing Database Encoding

2007-07-30 Thread Mitchell Vincent
Wow, it looks like I really did a number on these! I found iconv for Windows and have integrated it into the conversion process... NOw to tackled the Unicode handling (or non-handling) of the SQLite ODBC driver.. This will sure teach me to go around changing things! On 7/30/07, Nuno Lucas

Re: [sqlite] CREATE INDEX that is case insensitive?

2007-07-30 Thread Chase
ok. here's a SELECT that works... SELECT foo FROM bar WHERE foo LIKE 'D%' ORDER BY upper(foo); but, how could that upper(foo) part be used with the CREATE INDEX syntax? neither of the following attemps worked (syntax errors): CREATE INDEX barfooindex ON bar upper(foo); or CREATE INDEX

Re: [sqlite] CREATE INDEX that is case insensitive?

2007-07-30 Thread John Stanton
It is in correct order. You might try COLLATE NOCASE to force an uper case only sort. Chase wrote: Right now, when i do a select in sqlite that is supposed to be in alphabetical order, i get: DC Da De Do instead of: Da DC De Do The LIKE operator doesn't seems to be helping me here

Re: [sqlite] How to know which rows are affected by UPDATE/DELETE?

2007-07-30 Thread John Stanton
You should take a closer look at the structure of Sqlite, in particular how it uses pages. It is not amenable to your row locking strategy. Gilles Ganault wrote: Hello To write a front-end server to SQLite. To avoid locking the whole database, I'd like to implement optimistic locking, but

Re: [sqlite] Extremely new to SQLite

2007-07-30 Thread Rahul Banerjee
Thanks James, But everything is still foggy to me. Could you show me some example syntax that accomplishes the following. Thanks again, Rahul. James Dennett wrote: -Original Message- From: Rahul Banerjee [mailto:[EMAIL PROTECTED] Sent: Friday, July 27, 2007 1:34 PM To:

[sqlite] CREATE INDEX that is case insensitive?

2007-07-30 Thread Chase
Right now, when i do a select in sqlite that is supposed to be in alphabetical order, i get: DC Da De Do instead of: Da DC De Do The LIKE operator doesn't seems to be helping me here either. It searches the text case-insensitively, but it still outputs it in the "wrong" order. Keep

[sqlite] strategy adding indexes

2007-07-30 Thread RB Smissaert
What would be a good strategy in adding indexes to the various tables? I know SQLite can only use one index in simple (not intersect etc.) queries, so is it usually best to make: - indexes that include all possible combinations of fields that may appear in a WHERE clause. - make one very large

Re: [sqlite] Changing Database Encoding

2007-07-30 Thread Nuno Lucas
On 7/30/07, Mitchell Vincent <[EMAIL PROTECTED]> wrote: > I've read a few places that it is not possible to change the encoding > of a database once it's created. Is it possible to do it in some > automated way with any of the command line utilities? Read about the "pragma encoding" [1] SQL

[sqlite] Changing Database Encoding

2007-07-30 Thread Mitchell Vincent
I've read a few places that it is not possible to change the encoding of a database once it's created. Is it possible to do it in some automated way with any of the command line utilities? I converted a database from SQLite 2.X to 3.X using sqlite.exe's .dump function and apparently didn't set

Re: [sqlite] how to cout the nandflash expire

2007-07-30 Thread Ben Combee
On 7/30/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > hello, I port the sqlite3 to linux(file system is jffs2).now , I must cout > the nandflash expire in sqlite3 running. SQLite works on top of the file system, so it has no knowledge of what JFFS2 and MTD are doing to manage your NAND

Re: [sqlite] Unicode

2007-07-30 Thread Srebrenko Sehic
On 7/30/07, wcmadness <[EMAIL PROTECTED]> wrote: > I'm stuck on this. I'm writing a data layer that potentially needs to handle > diacritical (sp?) characters, such a French accented é characters or German > umlauted characters (sp?). It should be rare that I would run into > something like