[sqlite] database is locked error with 3.3.13

2007-03-06 Thread T
Hi all, I recently installed SQLite 3.3.13, after having used previous versions. I now get an error: Error: database is locked when I use the sqlite3 command line tool to access a database on a shared volume. But opening the same file with an earlier version works fine. I'm not sure

[sqlite] import operation - primary key need to be automatically generated by SQLite (not from csv file)

2007-03-06 Thread RohitPatel9999
/* SQLite 3.3.8 (Windows) used */ /* table t1 */ /* only two columns are given because other columns are irrelevant here */ create table t1 (id INTEGER PRIMARY KEY, name TEXT); /* few sample records from csv file data.csv */ 1,'name_text_1' 2,'name_text_2' 3,'name_text_3' 4,'name_text_4' /*

Re: [sqlite] sqlite - select/read only version

2007-03-06 Thread William F Pearson III
A smaller dll doesn't always mean a faster one. In fact enabling compiler optimizations generally make a faster executable, but often lead to an increase in binary size. I think a read only SQLite may be faster because of locks and other instructions, and it would be safer in a cgi-bin

Re: [sqlite] Re: Re: A few (probably) simple questions ...

2007-03-06 Thread David Bicking
On Wed, 2007-03-07 at 00:36 +0100, Stef Mientki wrote: > > Stef Mientki <[EMAIL PROTECTED]> wrote: > Q2: > Why isn't ALIAS supported in the JOIN-line, or am I doing something > wrong ? > SELECT Patient_text.*, Opnamen.* > FROM Patient > INNER JOIN

RE: [sqlite] What is wrong with this simple query (offset)?

2007-03-06 Thread RB Smissaert
It looks all as it should work and it compiles with the same number of warnings, but I get a bad dll calling convention in VB with the extra integer argument iFields. This is the altered .c source file: #include "vbsql.h" int NumberofRowsReturned=0; int _stdcall

[sqlite] Re: Re: Re: A few (probably) simple questions ...

2007-03-06 Thread Igor Tandetnik
Stef Mientki <[EMAIL PROTECTED]> wrote: I get the following error ":: no such table: Opnamen" (running from Delphi) Well, a logical follow up question is, do you actually have a table named Opnamen in your database? Yes, and "INNER JOIN Patient_text, Opnamen works as expected. Can't

Re: [sqlite] Re: Re: A few (probably) simple questions ...

2007-03-06 Thread Stef Mientki
Igor Tandetnik wrote: Stef Mientki <[EMAIL PROTECTED]> wrote: Q2: Why isn't ALIAS supported in the JOIN-line, or am I doing something wrong ? SELECT Patient_text.*, Opnamen.* FROM Patient INNER JOIN Patient_text, Opnamen AS O WHERE Patient.PatNr = Patient_text.PatNr AND

RE: [sqlite] What is wrong with this simple query (offset)?

2007-03-06 Thread RB Smissaert
OK, forget about this, I think I am nearly there. RBS -Original Message- From: RB Smissaert [mailto:[EMAIL PROTECTED] Sent: 06 March 2007 22:42 To: sqlite-users@sqlite.org Subject: RE: [sqlite] What is wrong with this simple query (offset)? Could I ask if somebody could tell me how I

[sqlite] Re: Re: A few (probably) simple questions ...

2007-03-06 Thread Igor Tandetnik
Stef Mientki <[EMAIL PROTECTED]> wrote: Q2: Why isn't ALIAS supported in the JOIN-line, or am I doing something wrong ? SELECT Patient_text.*, Opnamen.* FROM Patient INNER JOIN Patient_text, Opnamen AS O WHERE Patient.PatNr = Patient_text.PatNr ANDPatient.PatNr =

Re: [sqlite] A few (probably) simple questions ...

2007-03-06 Thread Stef Mientki
unfortunately it only supports sqlite 2 :-( I wondered if the source for the database interface of http://OpenOffice.org might help, since they appear to implement exactly that -- even including an sqlite driver. -- cheers, Stef Mientki http://pic.flappie.nl

FW: [sqlite] Re: A few (probably) simple questions ...-- or "Learning right from wrong."

2007-03-06 Thread Griggs, Donald
Regarding: where nothing is said about not supporting "RIGHT" UhRIGHT. Apparently, right is wrong. ;-) Though it may be corrected just by virtue of being posted on this list, anyone can submit a ticket on the documentation (or edit the wiki portion directly).

RE: [sqlite] What is wrong with this simple query (offset)?

2007-03-06 Thread RB Smissaert
Could I ask if somebody could tell me how I add an optional Boolean argument to this: SAFEARRAY * __stdcall sqlite_get_table( sqlite3 *db, /* The database on which the SQL executes */ const char *zSql, /* The SQL to be executed */ BSTR *ErrMsg /* Write error

Re: [sqlite] A few (probably) simple questions ...

2007-03-06 Thread Stef Mientki
thanks Donald, I should be ashamed, as OpenOffice is my standard office package, didn't know OpenOffice supported SQLite (MS-Access didn't ), so I'll take a look. -- cheers, Stef Mientki http://pic.flappie.nl - To

Re: [sqlite] Re: A few (probably) simple questions ...

2007-03-06 Thread Stef Mientki
thanks Igor, Q2: Why isn't ALIAS supported in the JOIN-line, or am I doing something wrong ? SELECT Patient_text.*, Opnamen.* FROM Patient INNER JOIN Patient_text, Opnamen AS O WHERE Patient.PatNr = Patient_text.PatNr ANDPatient.PatNr = '1' What exactly

RE: [sqlite] A few (probably) simple questions ...

2007-03-06 Thread Griggs, Donald
Stef, Regarding: "(I'm interested in this differences, because I'm trying to generate SQL statements from a visual design, like in MS-Access. If anyone knows good literature about generating SQL statements from graphical designs, I'ld be much obliged.)" === I wondered if the source for the

[sqlite] Re: A few (probably) simple questions ...

2007-03-06 Thread Igor Tandetnik
Stef Mientki <[EMAIL PROTECTED]> wrote: Q1: What's the difference between ON and WHERE, the 2 statements below return exactly the same ? SELECT Patient_text.*, Opnamen.* FROM Patient as P INNER JOIN Patient_text, Opnamen ON P.PatNr = Patient_text.PatNr WHERE P.PatNr

[sqlite] A few (probably) simple questions ...

2007-03-06 Thread Stef Mientki
Q1: What's the difference between ON and WHERE, the 2 statements below return exactly the same ? SELECT Patient_text.*, Opnamen.* FROM Patient as P INNER JOIN Patient_text, Opnamen ON P.PatNr = Patient_text.PatNr WHERE P.PatNr = '1' SELECT

RE: [sqlite] What is wrong with this simple query (offset)?

2007-03-06 Thread RB Smissaert
Yes, I can see now where this happens: TempWideDataHolder = CoTaskMemAlloc(1); // Set up array bounds SA_Bounds[0].cElements = NumberRows + 1; SA_Bounds[0].lLbound = 0; SA_Bounds[1].cElements = NumberofCols; SA_Bounds[1].lLbound = 0; //Create array

RE: [sqlite] What is wrong with this simple query (offset)?

2007-03-06 Thread RB Smissaert
OK, thanks. Will have a look now in the code where the field names are added to the array and will see if I can re-code this to make it optional. RBS -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: 06 March 2007 21:22 To: sqlite-users@sqlite.org Subject: Re:

Re: [sqlite] What is wrong with this simple query (offset)?

2007-03-06 Thread drh
"RB Smissaert" <[EMAIL PROTECTED]> wrote: > Ah, thanks. > I am not using the sqlite3 command line utility, but a VB adapted version of > the regular sqlite3.dll. I take it should be no problem to do the same with > that. Is there a pragma for this? > No. The returning of field names is going to

Re: [sqlite] sqlite - select/read only version

2007-03-06 Thread jp
Sqlite's size is perfect as it is, but I have a couple of apps where an even smaller "reader" could be used: 1. A cgi-bin based application, hosted at a third party place - no fast-cgi, no registering isapi dlls, etc. just plain cgi-bin which gets loaded/executed every time it is called (win32 +

Re: [sqlite] I Need database fot some test

2007-03-06 Thread Mikey C
Here is a database http://www.nabble.com/file/6997/Northwind.db Northwind.db It is an exact SQLite implementation of the well known Microsoft Northwind sample that can be found for MS Access and SQL Server. -- View this message in context:

[sqlite] Re: Re: Re: What is wrong with this simple query (offset)?

2007-03-06 Thread Igor Tandetnik
RB Smissaert <[EMAIL PROTECTED]> wrote: I am not using the sqlite3 command line utility, but a VB adapted version of the regular sqlite3.dll. I take it should be no problem to do the same with that. Is there a pragma for this? Nothing in SQLite API forces any kind of field names to be part of

RE: [sqlite] Re: Re: What is wrong with this simple query (offset)?

2007-03-06 Thread RB Smissaert
Ah, thanks. I am not using the sqlite3 command line utility, but a VB adapted version of the regular sqlite3.dll. I take it should be no problem to do the same with that. Is there a pragma for this? RBS -Original Message- From: Igor Tandetnik [mailto:[EMAIL PROTECTED] Sent: 06 March

[sqlite] Re: Re: What is wrong with this simple query (offset)?

2007-03-06 Thread Igor Tandetnik
RB Smissaert <[EMAIL PROTECTED]> wrote: I take it there is no way to make it not return the field name. I'm not sure what you mean by "not return the field name". My wild guess is you are using sqlite3 command line utility. In this case, type .header OFF before running the query. Igor

RE: [sqlite] Re: What is wrong with this simple query (offset)?

2007-03-06 Thread RB Smissaert
Yes, thanks I understand now. I take it there is no way to make it not return the field name. RBS -Original Message- From: Igor Tandetnik [mailto:[EMAIL PROTECTED] Sent: 06 March 2007 19:53 To: SQLite Subject: [sqlite] Re: What is wrong with this simple query (offset)? RB Smissaert

[sqlite] Re: What is wrong with this simple query (offset)?

2007-03-06 Thread Igor Tandetnik
RB Smissaert <[EMAIL PROTECTED]> wrote: Why does this query give a syntax error near offset? SELECT Name FROM SQLITE_MASTER WHERE TYPE = 'table' ORDER BY 1 ASC offset 2 The syntax doesn't allow OFFSET on its own, but only together with LIMIT. Make it LIMIT -1 OFFSET 2 -- or LIMIT 2, -1 -1

Re: [sqlite] What is wrong with this simple query (offset)?

2007-03-06 Thread Jeff Godfrey
- Original Message - From: "RB Smissaert" <[EMAIL PROTECTED]> To: Sent: Tuesday, March 06, 2007 1:39 PM Subject: [sqlite] What is wrong with this simple query (offset)? Why does this query give a syntax error near offset? SELECT Name FROM SQLITE_MASTER WHERE

RE: [sqlite] What is wrong with this simple query (offset)?

2007-03-06 Thread RB Smissaert
I can see now that doing SELECT name FROM SQLITE_MASTER WHERE TYPE = 'table' ORDER BY 1 ASC limit -1 offset 2 works, but it doesn't do what I was trying and that is to keep the field name out. RBS -Original Message- From: RB Smissaert [mailto:[EMAIL PROTECTED] Sent: 06 March 2007

[sqlite] What is wrong with this simple query (offset)?

2007-03-06 Thread RB Smissaert
Why does this query give a syntax error near offset? SELECT Name FROM SQLITE_MASTER WHERE TYPE = 'table' ORDER BY 1 ASC offset 2 limit works fine. RBS - To unsubscribe, send email to [EMAIL PROTECTED]

RE: [sqlite] Re: Why it does not work properly?

2007-03-06 Thread erw2
Thank you very much Igor!!, Your advices were very helpful. Do you know some good literature to learn/improve SQL knowledge ?? Best reg. Wojciech W. -Original Message- From: Igor Tandetnik [mailto:[EMAIL PROTECTED] Sent: Monday, March 05, 2007 2:21 PM To: SQLite Subject: [sqlite] Re:

[sqlite] In-Memory Dump/Serialization ?

2007-03-06 Thread Guy Rabiller
Hi, after reading the wiki entry "In Memory Database" ( http://www.sqlite.org/cvstrac/wiki/wiki?p=InMemoryDatabase ) I understand now that we can load a database file, work on it 'in-memory' then save the result back to a database file ( ATTACH/DETACH DATABASE ). For my current project, I

Re: AW: [sqlite] Soft search in database

2007-03-06 Thread John Stanton
I built something like that where each word was translated into a token and a key built from the token and the position of the word and used to build a tree. The tree access was fast and could probably be adapted to produce strict ranking by position. The complexity of the method is the need

Re: [sqlite] Soft search in database

2007-03-06 Thread John Stanton
Look up "page rank algorithm", in particular the papers by Brin and Page, the Google founders. Henrik Ræder wrote: Hi (First post - hope it's an appropriate place) I've been implementing a database of a few MB of text (indexing magazines) in SQLite, and so far have found it to work

Re: [sqlite] sqlite - select/read only version

2007-03-06 Thread drh
jp <[EMAIL PROTECTED]> wrote: > Has anybody tried to build a query-only (select only) > version of sqlite? > > I need to make a read-only version, without all the > CREATE xxx, INSERT, DELETE, UPDATE, etc., for > reporting purposes, which in theory should result in a > significantly smaller

[sqlite] sqlite - select/read only version

2007-03-06 Thread jp
Has anybody tried to build a query-only (select only) version of sqlite? I need to make a read-only version, without all the CREATE xxx, INSERT, DELETE, UPDATE, etc., for reporting purposes, which in theory should result in a significantly smaller .dll. Just like Acrobat has Acrobat Reader, I

Re: [sqlite] Backwards Conversion Of Databases

2007-03-06 Thread Dennis Cote
[EMAIL PROTECTED] wrote: This is actually a forwarded question. Someone on another group I frequent would like to convert a database from SQLite 3 to SQLite 2. I'm guessing there's nothing complex about the database, and most likely nothing SQLite 3 specific. What would be the easiest way

Re: [sqlite] Re : [sqlite] Soft search in database

2007-03-06 Thread Jos van den Oever
2007/3/6, Pierre Aubert <[EMAIL PROTECTED]>: You can also use ft3.sourceforge.net Does this also allow having an inverted index without actually storing the files in the database? Cheers, Jos - To unsubscribe, send

[sqlite] Re : [sqlite] Soft search in database

2007-03-06 Thread Pierre Aubert
You can also use ft3.sourceforge.net Pierre - Message d'origine De : Henrik Ræder <[EMAIL PROTECTED]> À : sqlite-users@sqlite.org Envoyé le : Mardi, 6 Mars 2007, 9h22mn 33s Objet : [sqlite] Soft search in database Hi (First post - hope it's an appropriate place) I've been

[sqlite] Backwards Conversion Of Databases

2007-03-06 Thread epankoke
This is actually a forwarded question. Someone on another group I frequent would like to convert a database from SQLite 3 to SQLite 2. I'm guessing there's nothing complex about the database, and most likely nothing SQLite 3 specific. What would be the easiest way to accomplish this task?

Re: [sqlite] Causes of SQLITE_SCHEMA errors

2007-03-06 Thread Ian Frosst
Aha. I shall give it a try, and see how I fare. Many thanks, Ian On 3/6/07, Marco Bambini <[EMAIL PROTECTED]> wrote: Are you using sqlite_prepare or sqlite_prepare_v2? If you use the v2 version I think that your problem will be solved... Regards, --- Marco Bambini http://www.sqlabs.net

[sqlite] SQLite usage queries

2007-03-06 Thread Aseem Rastogi
Hi All, I have a query regarding SQLite usage as follows. Any pointers will be really helpful. My application presents multiple threads of provisioning to user. SQLite database is used to keep audit logs (change logs storing the user name, time, operation done etc.). Now, the way we have

Re: [sqlite] Causes of SQLITE_SCHEMA errors

2007-03-06 Thread Marco Bambini
Are you using sqlite_prepare or sqlite_prepare_v2? If you use the v2 version I think that your problem will be solved... Regards, --- Marco Bambini http://www.sqlabs.net http://www.sqlabs.net/blog/ http://www.sqlabs.net/realsqlserver/ On Mar 6, 2007, at 2:22 PM, Ian Frosst wrote: Hey all,

Re: [sqlite] Causes of SQLITE_SCHEMA errors

2007-03-06 Thread drh
"Ian Frosst" <[EMAIL PROTECTED]> wrote: > I have a periodic occurrence of SQLITE_SCHEMA > [A]re any strategies for avoiding this... > Use sqlite3_prepare_v2() instead of sqlite3_prepare(). -- D. Richard Hipp <[EMAIL PROTECTED]>

[sqlite] Causes of SQLITE_SCHEMA errors

2007-03-06 Thread Ian Frosst
Hey all, I've got a bit of an odd situation going on. I have a fairly heavily threaded app making use of SQLite (which is working beautifully for the most part.) However, I've run into a bit of a situation. It seems that I have a periodic occurrence of SQLITE_SCHEMA occurring when executing

[sqlite] CREATE INDEX performance

2007-03-06 Thread Stephen Toney
Thanks again for all the good suggestions last week. I am now using a multi-column index and results of a table self-join are instantaneous! Even a 5-way join takes only 1-2 seconds. I'm very pleased. But it takes 30 minutes to build the index on a dual-core Windows machine with 4GB memory. Any

Re: [sqlite] question regarding Check-in [3671]:

2007-03-06 Thread drh
[EMAIL PROTECTED] wrote: > Joe Wilson <[EMAIL PROTECTED]> wrote: > > What sort of SQL statements will benefit most from this change? > > SQL statements that run on embedded platforms that lack a > OS filesystem cache. > I'm back at my office now and able to run some speed trials. It appears

Re: [sqlite] Soft search in database

2007-03-06 Thread Henrik Ræder
Hi Martin 2007/3/6, Martin Pfeifle <[EMAIL PROTECTED]>: Unfortunately, the fts module of sqlite does not support "fuzzy text search = google search". Yes, I realize this. I'll have to add some additional logic to achieve this. Looks doable. Such a module should not only support range

Re: [sqlite] Soft search in database

2007-03-06 Thread Henrik Ræder
Hi 2007/3/6, Michael Schlenker <[EMAIL PROTECTED]>: > Now my boss, who has a wonderfully creative mind, asks me to implement a > full-text search function which is not the usual simplistic 'found' / > 'not found', but more Google-style where a graded list of results is > returned. You have

Re: [sqlite] Lemon example

2007-03-06 Thread Martin Jenkins
Cesar Rodas wrote: The URL is ok, I opened here... Works fine in .uk too Martin - To unsubscribe, send email to [EMAIL PROTECTED] -

AW: [sqlite] Soft search in database

2007-03-06 Thread Martin Pfeifle
Unfortunately, the fts module of sqlite does not support "fuzzy text search = google search". What you first need is a similarity measure between strings, e.g. the Edit-distance. Based on such a similarity measure, you could build up an appropriate index structure, e.g. a Relational M-tree

Re: [sqlite] Soft search in database

2007-03-06 Thread Michael Schlenker
Henrik Ræder schrieb: Hi (First post - hope it's an appropriate place) I've been implementing a database of a few MB of text (indexing magazines) in SQLite, and so far have found it to work really well. Now my boss, who has a wonderfully creative mind, asks me to implement a full-text

[sqlite] Soft search in database

2007-03-06 Thread Henrik Ræder
Hi (First post - hope it's an appropriate place) I've been implementing a database of a few MB of text (indexing magazines) in SQLite, and so far have found it to work really well. Now my boss, who has a wonderfully creative mind, asks me to implement a full-text search function which