[sqlite] TCL Sqlite busy errorcode

2008-12-19 Thread Rick Pritchett
I was reading another site that mentioned that Sqlite busy crashes a TCL proc instead of returning an error code of 5. Is this true? Jim Dodgen replied: "pretty vague question. I recommend you supply more details like: what "other website" What version of SQLite are they referring to"

Re: [sqlite] confusing with how to to this in sqlite

2008-12-19 Thread Rachmat Febfauza
> The result should not be as you are expecting because column category > in table awal1 contain values 'FOOD' and column category in table > akhir1 contains values 'FOOD ' (an additional space character). If the > category columns (containijng 'FOOD') contain exactly the same text > then you

Re: [sqlite] confusing with how to to this in sqlite

2008-12-19 Thread D. Richard Hipp
On Dec 19, 2008, at 9:06 PM, Simon Davies wrote: >> >> how to make result like i hope? > > The result should not be as you are expecting because column category > in table awal1 contain values 'FOOD' and column category in table > akhir1 contains values 'FOOD ' (an additional space character). If

Re: [sqlite] confusing with how to to this in sqlite

2008-12-19 Thread Simon Davies
2008/12/20 Rachmat Febfauza : > I have problem with executing this query in sqlite. to reconstruct problem > please follow the following steps. > > > 1. create table awal1, akhir1 and hasil1 first. > > CREATE TABLE awal1(Code char(5),Level varchar(8), Category varchar(50), >

[sqlite] confusing with how to to this in sqlite

2008-12-19 Thread Rachmat Febfauza
I have problem with executing this query in sqlite. to reconstruct problem please follow the following steps. 1. create table awal1, akhir1 and hasil1 first. CREATE TABLE awal1(Code char(5),Level varchar(8), Category varchar(50), Product varchar(60), Location varchar(50), "Begin" datetime);

[sqlite] (no subject)

2008-12-19 Thread Rachmat Febfauza
I have problem with executing this query in sqlite. to reconstruct problem please follow the following steps. 1. create table awal1, akhir1 and hasil1 first. CREATE TABLE awal1(Code char(5),Level varchar(8), Category varchar(50), Product varchar(60), Location varchar(50), "Begin" datetime);

[sqlite] initcap function (patch for icu.c)

2008-12-19 Thread Miroslav Zagorac
Hello, here is a patch which adds initcap function for use with icu.c (which uses the icu4c library - International Components for Unicode). SQL syntax for use of initcap is similar to lower or upper functions (see documentation in the file ext/icu/README.txt. If you need it (or like it) use it

Re: [sqlite] cannot commit transaction - SQL statements in progress

2008-12-19 Thread Pankaj Gupta
Thanks Igor! I used an equivalent function in Qt called QSqlQuery::clear() that did the job. Igor Tandetnik wrote: > Pankaj Gupta > wrote: > >> I'm using SQLite 3.6.3 with C++ and Qt. >> >> My problem is that when a use a select statement in a transaction >>

Re: [sqlite] [perl] unable to open database file

2008-12-19 Thread Ribeiro, Glauber
Perhaps the directory name is mispeled? Do "$!" or "$@" have anything interesting in them? Perl's debugger is invoked with the -d switch. See the "perldebug" document -Original Message- From: LUKE [mailto:l...@tc.program.com.tw] Sent: Thursday, December 18, 2008 1:31 AM To:

Re: [sqlite] IN expression performance

2008-12-19 Thread Sander Jansen
On Thu, Dec 18, 2008 at 7:44 PM, Griggs, Donald wrote: > Regarding: > Is there a way to use a prepared statement and bind a (variable) > array of integers? > >Like in: >SELECT FROM table WHERE someinteger IN ( 2,18,19,340,1,72, 15 > ... ) > >

Re: [sqlite] Find out difference before and after update with cb

2008-12-19 Thread P Kishor
On 12/18/08, Daniel Schnell wrote: > Hi, > > is there a possibility to find out the difference before and after an > update of a table through the update callback ? > > I know that I can register a callback to a table for getting the rowid > of an SQLITE_UPDATE call. But

Re: [sqlite] delete-stmt-limited perf

2008-12-19 Thread Dan
On Dec 18, 2008, at 4:47 AM, Daniel Witte wrote: > So, I'd like to use the statement > > DELETE FROM moz_cookies WHERE lastAccessed <= ?1 ORDER BY > lastAccessed ASC > LIMIT ?2 > > for a query in Firefox backend code (we use the shipped > amalgamation, which > doesn't allow

Re: [sqlite] Unexpected interaction between virtual tables and the IN operator.

2008-12-19 Thread Filip Navara
Any update on this? It's seriously affecting performance in our application. Best regards, Filip Navara On Tue, Aug 12, 2008 at 6:33 PM, Scott Hess wrote: > [Full text of an example later in the email.] > > For a query like this: > > SELECT * FROM t_ft WHERE docid = (SELECT

[sqlite] delete-stmt-limited perf

2008-12-19 Thread Daniel Witte
So, I'd like to use the statement DELETE FROM moz_cookies WHERE lastAccessed <= ?1 ORDER BY lastAccessed ASC LIMIT ?2 for a query in Firefox backend code (we use the shipped amalgamation, which doesn't allow SQLITE_ENABLE_UPDATE_DELETE_LIMIT). The closest query we can implement, as far as I can

Re: [sqlite] sqlite3_create_function callback problem

2008-12-19 Thread Guillaume Schub
Ok, I figured it out !!! This was actually a calling convention problem. Our software is built using __fastcall as default convention, and the function in sqlite3.h is declared as: int __cdecl sqlite3_create_function( sqlite3 *, const char *zFunctionName, int nArg, int eTextRep, void*,

Re: [sqlite] sqlite3_create_function callback problem

2008-12-19 Thread Guillaume Schub
Sorry I forgot to mention: I already tried single C function. I even tried with extern "C" just in case but got exactly the same result. I also tried __stdcall and __cdecl but looks like SQLite is wayting for __fastcall function pointer On Wed, Dec 17, 2008 at 5:37 PM, Martin Engelschalk

Re: [sqlite] sqlite3_create_function callback problem

2008-12-19 Thread Guillaume Schub
Hello, Looks like my last reply wasn't received So I tried with a static function out of a class without more success. Then I tried changing the calling convention to __stdcall and even __cdecl, but I got a compilation error asking for a __fastcall function, so no more success here (I'm