Re: [sqlite] Regarding String Comparision

2005-12-05 Thread Ritesh Kapoor
thanks for your help I got my work done ritesh On Mon, 2005-12-05 at 17:11, Rob Lohman wrote: > It seems we are both right :) > > sqlite> create table test (filename varchar(1000) primary key); > sqlite> insert into test (filename) values ('test'); > sqlite> select * from test where

Re: [sqlite] updating .schema after ALTER TABLE

2005-12-05 Thread Aaron Peterson
On 12/5/05, Paul Bohme <[EMAIL PROTECTED]> wrote: > Aaron Peterson wrote: > > >I added a column to a table with ALTER TABLE. I'm sure it worked as > >expected since trying to add it again produces an error that the > >column already exists. However, .schema doesn't show the new column. > > > >Is

[sqlite] updating .schema after ALTER TABLE

2005-12-05 Thread Aaron Peterson
I added a column to a table with ALTER TABLE. I'm sure it worked as expected since trying to add it again produces an error that the column already exists. However, .schema doesn't show the new column. Is there some other command that shows all current columns? Is there a way to update the

Re: [sqlite] sqlite3_create_function in delphi

2005-12-05 Thread juan perez
They said it works only with plain (7-bit) ascii, no UTF. Dennis Cote wrote: Miha Vrhovnik wrote: Does anybody know how to add custom function to sqlite3 in Delphi? Cariotoglou Mike? I'd like to add function 'Lower' so I can match case insenisitive text columns in table. Regards, Miha

Re: [sqlite] sqlite3_create_function in delphi

2005-12-05 Thread juan perez
Miha, what wrapper/library are you using? The following works for me (free). In your case, you need to change the sqlite3_result_int with sqlite3_result_text and pass the correct parameters to 'lower case' your var: - - - - - - - PROCEDURE fn(ctx:pointer;n:integer;args:ppchar);cdecl; VAR

Re: [sqlite] problem with blobs (perl code)

2005-12-05 Thread Nathan Kurz
On Mon, Dec 05, 2005 at 08:23:19AM -0500, [EMAIL PROTECTED] wrote: > > OK, so 1.11 is on CPAN which fixes this. However I have another bug > > report about this not working for user defined functions, where I do > > this: > > > > s = SvPV(result, len); > > sqlite3_result_text(

Re: [sqlite] problem with blobs (perl code)

2005-12-05 Thread Matt Sergeant
On 5 Dec 2005, at 13:23, [EMAIL PROTECTED] wrote: I added a test case (check-in [2798]) that checks to make sure that sqlite3_result_text is able to deal with embedded '\000' characters in a string. I appears to work fine. I cannot reproduce the problem Can you suggest other ways of

Re: [sqlite] sqlite3_create_function in delphi

2005-12-05 Thread Dennis Cote
Miha Vrhovnik wrote: Does anybody know how to add custom function to sqlite3 in Delphi? Cariotoglou Mike? I'd like to add function 'Lower' so I can match case insenisitive text columns in table. Regards, Miha There is a already a function lower() built in to SQLite. It returns a

Re: [sqlite] problem with blobs (perl code)

2005-12-05 Thread drh
Matt Sergeant <[EMAIL PROTECTED]> wrote: > > OK, so 1.11 is on CPAN which fixes this. However I have another bug > report about this not working for user defined functions, where I do > this: > > s = SvPV(result, len); > sqlite3_result_text( context, s, len, SQLITE_TRANSIENT

Re: [sqlite] problem with blobs (perl code)

2005-12-05 Thread Matt Sergeant
On 2 Dec 2005, at 13:07, [EMAIL PROTECTED] wrote: Right. So it's retreival that's the issue when this occurs, because I do: int col_type = sqlite3_column_type(stmt, i); and it returns SQLITE_TEXT, so I then do: val = (char*)sqlite3_column_text(stmt, i); which doesn't return a length

Re: [sqlite] Regarding String Comparision

2005-12-05 Thread Rob Lohman
It seems we are both right :) sqlite> create table test (filename varchar(1000) primary key); sqlite> insert into test (filename) values ('test'); sqlite> select * from test where filename='test'; test sqlite> select * from test where filename='tesT'; sqlite> select * from test where filename

RE: [sqlite] Regarding String Comparision

2005-12-05 Thread Brandon, Nicholas
Rob/Ritesh >Also keep in mind that such a search is CASE SENSITIVE. >There are two solutions to that, either makes the collation >case insensitive or do a: I don't have access to SQLite immediately but I seem to remember in one of my applications that the use of select * from test where

Re: [sqlite]cross compiling with powerpc

2005-12-05 Thread Ajay Radhakrishnan
configure: error: unable to find a compiler for building build tools Have you tried setting the path where the powerpc compiler in installed? Regards, Ajay. On 12/2/05, Julien LEFORT <[EMAIL PROTECTED]> wrote: > > Hi, > I've been struggling for few hours trying to run the configure script the >

Re: [sqlite] Regarding String Comparision

2005-12-05 Thread Rob Lohman
Keep in mind that string should be surrounded by single quotes instead of double quotes: exact match: select * from test where filename = 'file'; partial match: select * from test where filename like '%file%'; Also keep in mind that such a search is CASE SENSITIVE. There are two solutions to

Re: [sqlite] Regarding String Comparision

2005-12-05 Thread Ritesh Kapoor
Thanks Martin Thats exactly what I wanted to know. And I think this is the fastest reply/solution I ever got!! ritesh On Mon, 2005-12-05 at 14:36, Martin Engelschalk wrote: > Hi, > > I am not sure if i understand your question right. Perhaps the following > will help: > > The behaviour

Re: [sqlite] Regarding String Comparision

2005-12-05 Thread Martin Engelschalk
Hi, I am not sure if i understand your question right. Perhaps the following will help: The behaviour depends on the comparison operator. If you do select ... from FileTable where FileName = "testfile.txt" then the whole string will be matched If you do select ... from FileTable where

[sqlite] Regarding String Comparision

2005-12-05 Thread Ritesh Kapoor
Hi, I am debugging a program which has a FileTable field called FileName declared as- "FileName varchar(1024) primary key" It stores filenames including their paths e.g. - "myDir1/testfile.txt" If I were to search in this FileTable in the column FileName for a string "testfile.txt" would it