Re: [sqlite] Case-sensitivity, performance and LIKE

2010-03-30 Thread Jay A. Kreibich
On Tue, Mar 30, 2010 at 10:59:49PM -0400, Tom Holden scratched on the wall: > > - Original Message - From: "Jay A. Kreibich" > To: "General Discussion of SQLite Database" > Sent: Tuesday, March 30, 2010 9:26 PM > Subject: Re: [sqlite] Case-sensitivity, performance and LIKE > > >> On Tue,

Re: [sqlite] Case-sensitivity, performance and LIKE

2010-03-30 Thread Tom Holden
- Original Message - From: "Jay A. Kreibich" To: "General Discussion of SQLite Database" Sent: Tuesday, March 30, 2010 9:26 PM Subject: Re: [sqlite] Case-sensitivity, performance and LIKE > On Tue, Mar 30, 2010 at 08:41:09PM -0400, Tom Holden scratched on the > wall: >> >> - Orig

Re: [sqlite] Case-sensitivity, performance and LIKE

2010-03-30 Thread Jay A. Kreibich
On Tue, Mar 30, 2010 at 08:41:09PM -0400, Tom Holden scratched on the wall: > > - Original Message - > From: "Simon Slavin" > > columnName TEXT COLLATE NOCASE > > > > then all sorting and SELECT queries on it will ignore case. > > You don't even have to change the defined collation as y

Re: [sqlite] Case-sensitivity, performance and LIKE

2010-03-30 Thread Tom Holden
- Original Message - From: "Simon Slavin" To: "General Discussion of SQLite Database" Sent: Tuesday, March 30, 2010 8:12 PM Subject: Re: [sqlite] Case-sensitivity, performance and LIKE > > On 31 Mar 2010, at 12:51am, Rashed Iqbal wrote: > >> Is there a way to make SQLite queries case-

Re: [sqlite] Case-sensitivity, performance and LIKE

2010-03-30 Thread Simon Slavin
On 31 Mar 2010, at 12:51am, Rashed Iqbal wrote: > Is there a way to make SQLite queries case-insensitive? > > For example my query is: > > SELECT * from Customers WHERE LastName = 'Shaw' AND FirstName = 'Gioia' > > and I want to be able to get same results no matter if the case is good > in

[sqlite] Case-sensitivity, performance and LIKE

2010-03-30 Thread Rashed Iqbal
Hello, I need help with the following question: Is there a way to make SQLite queries case-insensitive? For example my query is: SELECT * from Customers WHERE LastName = 'Shaw' AND FirstName = 'Gioia' and I want to be able to get same results no matter if the case is good in the D

Re: [sqlite] Select * from tablename results in an exception

2010-03-30 Thread Burnett, Joe
Thank you all for the replies. The message was a bit of a red herring. I had issues in my SQLite DB schema - VARCHAR(64) was not big enough. Joe Burnett | Principal Software Engineer | FIDELITY INSTITUTIONAL TECHNOLOGY 2 Contra Way Merrimack, NH 03054 603.791.5113 cell: 603.289.0481 -Origina

Re: [sqlite] Select * from tablename results in an exception

2010-03-30 Thread Tim Romano
http://social.msdn.microsoft.com/Forums/en-US/Vsexpressvb/thread/27aec612-5ca4-41ba-80d6-0204893fdcd1 Maybe related. Regards Tim Romano ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] Preserving column size

2010-03-30 Thread Kevin M.
> Sorry I misunderstood your requirement, Kevin. I was focusing on the >singular "a table" and "the table" in your original post, versus the plural > "many types of structs". I thought you were looking for serialization > approach. > Regards > Tim Romano Ah, now I see from where the misunderst

Re: [sqlite] Select * from tablename results in an exception

2010-03-30 Thread Simon Slavin
On 30 Mar 2010, at 2:55pm, Burnett, Joe wrote: > Your understanding is correct. However, I used the SQLite Admin tool and > the select * query > was successful after the table was populated and the program exited. > > Isn't that the same thing? Okay, if I understand your result, you have a sp

[sqlite] multithreading (through C++ wrapper)

2010-03-30 Thread Aymeric . Moureau-EXT
Hello, I'm working on a C++ application under WinCE (file system is TexFAT), with SQLite (actually version 3.6.11, but phenomenon is reproduced with 3.6.23) with the following C++ wrapper : http://www.alhem.net/project/sqlite/index.html . There's only one database with three tables (file is ar

Re: [sqlite] Segfault and incorrect result in last_insert_rowid() function

2010-03-30 Thread Dan Kennedy
On Mar 30, 2010, at 8:53 PM, Pavel Ivanov wrote: >> The segfault is now fixed here: >> >> http://www.sqlite.org/src/info/ca359a3e80 > > Does the comment to commit mean that in the same test case if view has > no triggers then compilation of the statement will still segfault? No. _

Re: [sqlite] Select * from tablename results in an exception

2010-03-30 Thread Burnett, Joe
Hi Simon, Your understanding is correct. However, I used the SQLite Admin tool and the select * query was successful after the table was populated and the program exited. Isn't that the same thing? Thanks for your reply. Joe Burnett | Principal Software Engineer | FIDELITY INSTITUTIONAL TECHN

Re: [sqlite] Segfault and incorrect result in last_insert_rowid() function

2010-03-30 Thread Pavel Ivanov
> The segfault is now fixed here: > >   http://www.sqlite.org/src/info/ca359a3e80 Does the comment to commit mean that in the same test case if view has no triggers then compilation of the statement will still segfault? Pavel On Tue, Mar 30, 2010 at 9:44 AM, Dan Kennedy wrote: > > On Mar 30, 20

Re: [sqlite] Segfault and incorrect result in last_insert_rowid() function

2010-03-30 Thread Alexey Pechnikov
Hello! On Tuesday 30 March 2010 16:12:18 Pavel Ivanov wrote: > From http://www.sqlite.org/c3ref/last_insert_rowid.html: > > "If an INSERT occurs within a trigger, then the rowid of the inserted > row is returned by this routine as long as the trigger is running. But > once the trigger terminates,

Re: [sqlite] Preserving column size

2010-03-30 Thread Tim Romano
Sorry I misunderstood your requirement, Kevin. I was focusing on the singular "a table" and "the table" in your original post, versus the plural "many types of structs". I thought you were looking for serialization approach. Regards Tim Romano On Tue, Mar 30, 2010 at 8:48 AM, Kevin M. wrote:

Re: [sqlite] Segfault and incorrect result in last_insert_rowid() function

2010-03-30 Thread Dan Kennedy
On Mar 30, 2010, at 6:29 PM, Alexey Pechnikov wrote: > Hello! > > CREATE TABLE test ( > id INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL > ); > CREATE VIEW view_test as select * from test; > CREATE TRIGGER view_test_insert instead of insert on view_test > begin > insert into test (id) values (NULL

Re: [sqlite] Select * from tablename results in an exception

2010-03-30 Thread Simon Slavin
On 30 Mar 2010, at 2:01pm, Burnett, Joe wrote: > I am using SQLite in a C# .NET application. I am inserting into tables > without any issues as confirmed by the SQLite Admin tool. > However, later in the application, I want to query the table where I > inserted the data, I get the following excep

Re: [sqlite] Select * from tablename results in an exception

2010-03-30 Thread Burnett, Joe
That isn't the real name of the table, something else is the real name. Thanks, Joe Burnett | Principal Software Engineer | FIDELITY INSTITUTIONAL TECHNOLOGY 2 Contra Way Merrimack, NH 03054 603.791.5113 cell: 603.289.0481 -Original Message- From: sqlite-users-boun...@sqlite.org [mailt

Re: [sqlite] Select * from tablename results in an exception

2010-03-30 Thread Simon Slavin
On 30 Mar 2010, at 2:01pm, Burnett, Joe wrote: >string sql = "select * from Table"; Can you use 'Table' as the name of a table ? Simon. ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listin

[sqlite] Select * from tablename results in an exception

2010-03-30 Thread Burnett, Joe
Hi All, I am using SQLite in a C# .NET application. I am inserting into tables without any issues as confirmed by the SQLite Admin tool. However, later in the application, I want to query the table where I inserted the data, I get the following exception: "Failed to enable constraints. One or mor

Re: [sqlite] Preserving column size

2010-03-30 Thread Kevin M.
Actually Tim that is not what I was asking at all. This is converting an application from using MySQL to SQLite. All the tables are normalized already. But instead of rewriting a large chunk of the application, I'd rather use the implementation as is substituting only the code needed to use S

Re: [sqlite] Sqlite3 crashing on multithreaded program

2010-03-30 Thread Dan Kennedy
On Mar 30, 2010, at 7:37 PM, Periasamy, Karthikeyan wrote: > Hi, > > Our application is a multithreaded program running on Powerpc e300 > mpc8343 embedded board. There are 8 threads running which are > querying and updating DB parallelly and continuously. We are using > libdbi-0.8.2 and sq

[sqlite] Sqlite3 crashing on multithreaded program

2010-03-30 Thread Periasamy, Karthikeyan
Hi, Our application is a multithreaded program running on Powerpc e300 mpc8343 embedded board. There are 8 threads running which are querying and updating DB parallelly and continuously. We are using libdbi-0.8.2 and sqlite-3.6.16 to interact with sqlite3 DB file. The application crashes when

Re: [sqlite] Preserving column size

2010-03-30 Thread Tim Romano
On Tue, Mar 30, 2010 at 4:30 AM, Jean-Denis Muys wrote: > > > See http://www.boost.org and more specifically: > http://www.boost.org/doc/libs/1_42_0/libs/serialization/doc/index.html > > The OP's question is another form of this question: What's the best way to violate 1NF in SQLite, so that in

Re: [sqlite] Segfault and incorrect result in last_insert_rowid() function

2010-03-30 Thread Pavel Ivanov
From http://www.sqlite.org/c3ref/last_insert_rowid.html: "If an INSERT occurs within a trigger, then the rowid of the inserted row is returned by this routine as long as the trigger is running. But once the trigger terminates, the value returned by this routine reverts to the last value inserted b

[sqlite] Segfault and incorrect result in last_insert_rowid() function

2010-03-30 Thread Alexey Pechnikov
Hello! CREATE TABLE test ( id INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL ); CREATE VIEW view_test as select * from test; CREATE TRIGGER view_test_insert instead of insert on view_test begin insert into test (id) values (NULL); end; insert into view_test (id) values (NULL); select last_insert_

Re: [sqlite] sqlite performance with large and multiple attached databases

2010-03-30 Thread Simon Slavin
On 30 Mar 2010, at 9:02am, Akbar Syed wrote: > Unfortunately, I could not think about any other option than to keep > the devices attached all the time. I hope you don't have to handle many attachable devices, because SQLite can't handle more than 30 simultaneous ATTACHes. See section 11 of <

[sqlite] sqlite performance with large and multiple attached databases

2010-03-30 Thread Akbar Syed
>>Make one big 'working' database by reading all the data from the databases on >>the independent devices and putting it into one big table. Once you have >>sucked out the data you can disconnect from the device. Then do all your >>enquiries on this big table. There's a special convenient for

Re: [sqlite] Preserving column size

2010-03-30 Thread Jean-Denis Muys
On 3/29/10 23:10 , "Tim Romano" wrote: > On 3/29/2010 4:19 PM, Kevin M. wrote: >> I have a C/C++ application in which I want to store data from a struct into a >> table (using SQLite 3.6.23) and later retrieve data from the table and store >> it back in the struct. But, I need a general interfac