Re: [sqlite] implementing busy_handler callback

2006-08-22 Thread Ritesh Kapoor
I think a good way of using sqlite in a multithreaded app is to have your own mutex lock for the DB. Everytime you need to execute a query just call the lock() function for your mutex and then proceed with sqlite3_exec() calls. Followed by a unlock() call. Your mutex wouldn't return if the

[sqlite] implementing busy_handler callback

2006-08-22 Thread vadivel . subramaniam
Hi All, I am trying to integrate SQLite in a multithreaded C++ application which runs on Linux. I have gone through the SQLIte documentation, but it's not clear whether the sqlite3_exec() will retry the query when the busy handler callback is implemented and returns a non-zero value. From

[sqlite] crystal report.net with sqlite

2006-08-22 Thread sourav
Hi, Can any body help how can i connect crystal report to sqlite for exporting the data. Thanks -- View this message in context: http://www.nabble.com/crystal-report.net-with-sqlite-tf2150380.html#a5938119 Sent from the SQLite forum at Nabble.com.

Re: [sqlite] Seems like a bug in the parser

2006-08-22 Thread Joe Wilson
--- [EMAIL PROTECTED] wrote: > "Alexei Alexandrov" <[EMAIL PROTECTED]> wrote: > > I noticed something like a bug in the SQLite parser: queries with > > "group by" expression should accept only fields listed in the "group > > by" clause or aggregated fields (with sum(), max() etc). For example, > >

[sqlite] Stop multiple simultaneous users

2006-08-22 Thread Dr Gerard Hammond
Hi, How can I stop multiple simultaneous users accessing a SQLite database? Is there a SQLite function that tells me how many people/applications have the database open? I am using REALbasic on a OSX, Win32 and Linux. -- Cheers, Dr Gerard Hammond MacSOS Solutions Pty Ltd, 505/176 Glenmore

[sqlite] Re: how can i optimize this query

2006-08-22 Thread Cesar David Rodas Maldonado
The query SQL query that I sent represents the next search : word1 word2 "word3 word4" On 8/22/06, Cesar David Rodas Maldonado <[EMAIL PROTECTED]> wrote: I have the next table with about 10.000.000 of records- CREATE TABLE ft_index ( docid int(11) NOT NULL default '0', wordid int(11)

[sqlite] how can i optimize this query

2006-08-22 Thread Cesar David Rodas Maldonado
I have the next table with about 10.000.000 of records- CREATE TABLE ft_index ( docid int(11) NOT NULL default '0', wordid int(11) NOT NULL default '0', posicion int(11) NOT NULL default '0', ranking float NOT NULL default '0', lang int(11) NOT NULL default '0', KEY docid

Re: [sqlite] Re: database locked

2006-08-22 Thread Laura Longo
Do you have the 'fuser' command in your flavor of linux/unix? http://linux.about.com/library/cmd/blcmdl1_fuser.htm Yes! Could this help? Sorry for this stupid question, I've read the man pages... it's a wonderful command! Thank you Jay! Laura

Re: [sqlite] Re: database locked

2006-08-22 Thread Jay Sprenkle
On 8/22/06, Laura Longo <[EMAIL PROTECTED]> wrote: > Do you have the 'fuser' command in your flavor of linux/unix? > > http://linux.about.com/library/cmd/blcmdl1_fuser.htm > Yes! Could this help? If some other program has the file open it will tell you. When you get a lockup use it to figure

Re: [sqlite] Re: database locked

2006-08-22 Thread Laura Longo
Do you have the 'fuser' command in your flavor of linux/unix? http://linux.about.com/library/cmd/blcmdl1_fuser.htm Yes! Could this help? - To unsubscribe, send email to [EMAIL PROTECTED]

Re: [sqlite] libsqlite3.so

2006-08-22 Thread Laura Longo
"Laura Longo" <[EMAIL PROTECTED]> wrote: Hi Richard, I've tried with mkso.sh but an error has immediately stopped me: make: *** No rule to make target `target_source'. Stop. You need to make a copy of Makefile.linux-gcc into your build directory, change the name to just "Makefile", and

Re: [sqlite] Seems like a bug in the parser

2006-08-22 Thread drh
"Alexei Alexandrov" <[EMAIL PROTECTED]> wrote: > I noticed something like a bug in the SQLite parser: queries with > "group by" expression should accept only fields listed in the "group > by" clause or aggregated fields (with sum(), max() etc). For example, > given the table > > create table qqq

[sqlite] Seems like a bug in the parser

2006-08-22 Thread Alexei Alexandrov
I noticed something like a bug in the SQLite parser: queries with "group by" expression should accept only fields listed in the "group by" clause or aggregated fields (with sum(), max() etc). For example, given the table create table qqq (a text, b integer); the following query should not be

Re: [sqlite] Re: database locked

2006-08-22 Thread Jay Sprenkle
In the source code at the begin of the two processes that execute queries on the database I've used the code: srand(time(NULL)); to avoid collisions... (I never started the two processes at the same instant) That should work great. >> >>

Re: [sqlite] Re: database locked

2006-08-22 Thread Laura Longo
- Original Message - From: "Jay Sprenkle" <[EMAIL PROTECTED]> To: Sent: Tuesday, August 22, 2006 6:06 PM Subject: Re: [sqlite] Re: database locked On 8/22/06, Christian Smith <[EMAIL PROTECTED]> wrote: Laura Longo uttered: > > >> On 8/21/06, Laura Longo

Re: [sqlite] Re: database locked

2006-08-22 Thread Rob Sciuk
On Tue, 22 Aug 2006, Laura Longo wrote: > Date: Tue, 22 Aug 2006 08:51:34 +0200 > From: Laura Longo <[EMAIL PROTECTED]> > Reply-To: sqlite-users@sqlite.org > To: sqlite-users@sqlite.org > Subject: Re: [sqlite] Re: database locked > > > Laura, > > > > 'df -h' should give you some hints, or

Re: [sqlite] libsqlite3.so

2006-08-22 Thread drh
"Laura Longo" <[EMAIL PROTECTED]> wrote: > > Hi Richard, > I've tried with mkso.sh but an error has immediately stopped me: > > make: *** No rule to make target `target_source'. Stop. You need to make a copy of Makefile.linux-gcc into your build directory, change the name to just "Makefile",

Re: [sqlite] Re: database locked

2006-08-22 Thread Jay Sprenkle
On 8/22/06, Christian Smith <[EMAIL PROTECTED]> wrote: Laura Longo uttered: > > >> On 8/21/06, Laura Longo <[EMAIL PROTECTED]> wrote: >>> I've tried also executing the query "begine exclusive" before the >>> "update", >>> and "commit" to end the entire routine, and the query that now returns

Re: [sqlite] Re: database locked

2006-08-22 Thread Laura Longo
Try using sqlite3_busy_timeout(), to get round the temporary locks if possible. SQLite will retry locked database access until the command either succeeds or times out. http://www.sqlite.org/capi3ref.html#sqlite3_busy_timeout If this does not fix your problem, it is possible that an

[sqlite] importing csv files into a sqlite db?

2006-08-22 Thread John Salerno
Let's say I have many csv files (25, to be exact) and want to create a sqlite database out of them? How do I do that? Furthermore, in addition to the 25 text files of data, there are 25 corresponding sql files that define the tables, so does this mean those would have to be rewritten in sqlite?

Re: [sqlite] Re: database locked

2006-08-22 Thread Christian Smith
Laura Longo uttered: On 8/21/06, Laura Longo <[EMAIL PROTECTED]> wrote: I've tried also executing the query "begine exclusive" before the "update", and "commit" to end the entire routine, and the query that now returns the exit code 5 (database locked) is "begin exclusive", I don't know if

Re: [sqlite] libsqlite3.so

2006-08-22 Thread Laura Longo
Hi Clay, I'm workink under Linux (CentOS), kernel 2.6.16... That's the right file. It might be helpful to know what platform you're building on, and if that platform supports shared libraries. Shared libraries are usually built by default on platforms that support them. As for the source to

Re: [sqlite] libsqlite3.so

2006-08-22 Thread drh
"Laura Longo" <[EMAIL PROTECTED]> wrote: > Hi all, > I would like to view the source code of libsqlite3.so because of a problem > with sqlite3_get_table function... I have a question: in the file > sqlite-3.3.7.tar.gz that I find at http://www.sqlite.org/download.html, are > there also the

Re: [sqlite] libsqlite3.so

2006-08-22 Thread Clay Dowling
That's the right file. It might be helpful to know what platform you're building on, and if that platform supports shared libraries. Shared libraries are usually built by default on platforms that support them. As for the source to sqlite3_get_table, it will be visible in your source. You will

[sqlite] libsqlite3.so

2006-08-22 Thread Laura Longo
Hi all, I would like to view the source code of libsqlite3.so because of a problem with sqlite3_get_table function... I have a question: in the file sqlite-3.3.7.tar.gz that I find at http://www.sqlite.org/download.html, are there also the source code of the library? If the answer is no, where

Re: [sqlite] Re: database locked

2006-08-22 Thread Laura Longo
Laura, 'df -h' should give you some hints, or 'showmount'. I run on BSD not Linux, but most unix like OS's will tell you if the mount point is a hard drive or a remote mount, in which case, it will have a hostname:/path instead of a /dev/dsk device file as the device/partition information.