Re: [sqlite] Getting SQLITE_BUSY within a transaction andhow tohandle it

2009-03-17 Thread Marcus Grimm
Dennis, I'm wondering on which statement your first thread returns busy as well. both are waiting to get a transaction acquired? Or is the first thread waiting for the commit? Maybe you can post some code or a little extraction of what you are doing? When I started with sqlite and threads I can r

Re: [sqlite] httpd server ???

2009-03-17 Thread Petite Abeille
On Mar 18, 2009, at 12:30 AM, Ken wrote: > Does anyone know of an embedded http server that can serve and/or > create pages from a sqlite database? Arguably, there is an embarrassment of choices: http://en.wikipedia.org/wiki/Comparison_of_lightweight_web_servers To add to the confusion, here

[sqlite] accessing php produced db from shell

2009-03-17 Thread prad
i'm working through one of the php-sqlite tutorials: http://www.scriptol.com/sql/sqlite-table.php it works fine, but when i try going in with sqlite3 from the shell and try to do anything, i get SQL error: file is encrypted or is not a database i'm using sqlite3, but with php5 i had to install php

Re: [sqlite] httpd server ???

2009-03-17 Thread dcharno
> The SQLite website is implemented using a profoundly simple HTTP > server that runs off of inetd. The complete source code is contained > in a single file of C code that is available on-line at: > > http://www.sqlite.org/docsrc/artifact/84d487ac34 Just to clarify, this code is part of

Re: [sqlite] Getting SQLITE_BUSY within a transaction andhow tohandle it

2009-03-17 Thread Dennis Volodomanov
> You may also try this: > > http://www.sqlite.org/cvstrac/wiki?p=SampleCode > > I did use exclusive transactions there but you may change > accordingly and try to fit better in your scenario. > > If that still doesn't do the job you may post the results here again. Thank you, I've picked up yo

Re: [sqlite] Speed of DROP INDEX

2009-03-17 Thread Jim Wilcoxson
Drop is executed within a transaction, which means that every record you touch has to be backed up to the journal first, then modified in the database. I'm guessing that if you use pragma synchronous=off, it would speed up the drop index, but you'd take a chance on corrupting the database if the m

Re: [sqlite] table metadata

2009-03-17 Thread Dennis Cote
P Kishor wrote: > On Sun, Mar 15, 2009 at 11:56 AM, P Kishor wrote: > >> I am designing a database for carbon modeling. Many of the parameters >> to be stored in the db have very long names... it is kinda >> inconvenient to have column names such as >> 'new_live_wood_Carbon_to_new_total_wood_Ca

Re: [sqlite] Passing FIELD Object To Function

2009-03-17 Thread TW
> Please forgive me if SQLite has a built-in forms package that I haven't > noticed, but the one quoted #include line above doesn't appear to > qualify your question as being "on-topic" for this mailing list > ("General Discussion of SQLite Database "). > > What forms package are you using? Doe

Re: [sqlite] Passing FIELD Object To Function

2009-03-17 Thread John Machin
On 18/03/2009 10:53 AM, TW wrote: [snip] > #include "sqlite.h" [snip] > I'm getting a blank form. I could put all of this in one block, but, > when I want to delete a record, > I don't want to write duplicate code, hence, passing the FIELD, FORM, & > WINDOW objects. The address

Re: [sqlite] httpd server ???

2009-03-17 Thread Griggs, Donald
-Original Message- From: sqlite-users-boun...@sqlite.org [mailto:sqlite-users-boun...@sqlite.org] On Behalf Of Ken Sent: Tuesday, March 17, 2009 7:31 PM To: sqlite Subject: [sqlite] httpd server ??? === Hi, Ken, Mr. Hipp's Tiny Web

Re: [sqlite] httpd server ???

2009-03-17 Thread D. Richard Hipp
On Mar 17, 2009, at 7:30 PM, Ken wrote: > > This is off topic, but since sqlite list has such savvy folks I > thought I'd try here. > > Does anyone know of an embedded http server that can serve and/or > create pages from a sqlite database? Such a server is built into the "fossil" configura

Re: [sqlite] httpd server ???

2009-03-17 Thread prad
On Tue, 17 Mar 2009 16:42:04 -0700 Tito Ciuro wrote: > ... or you can try Cherokee: > or even lighttpd may be http://www.lighttpd.net/ -- In friendship, prad ... with you on your journey Towards Freedom http://www.towardsfreedom.com (website) Information,

[sqlite] Passing FIELD Object To Function

2009-03-17 Thread TW
I have a function (populate_edit_form) declared in a header as such: /* recmanip.h */ #ifndef RECMANIP_H #define RECMANIP_H #include #include #include #include "winmanip.

Re: [sqlite] httpd server ???

2009-03-17 Thread P Kishor
On Tue, Mar 17, 2009 at 6:30 PM, Ken wrote: > > This is off topic, but since sqlite list has such savvy folks I thought I'd > try here. > > Does anyone know of an embedded http server that can serve and/or create > pages from a sqlite database? > > > Thanks, > Ken > DRH has an implementation o

Re: [sqlite] httpd server ???

2009-03-17 Thread Tito Ciuro
... or you can try Cherokee: http://www.cherokee-project.com/ -- Tito On 17 mars 2009, at 16:39, Nuno Magalhães wrote: >> Does anyone know of an embedded http server that can serve and/or >> create pages from a sqlite database? > > What do you mean embedded? If you mean fast and lightweight,

Re: [sqlite] httpd server ???

2009-03-17 Thread Nuno Magalhães
> Does anyone know of an embedded http server that can serve and/or create > pages from a sqlite database? What do you mean embedded? If you mean fast and lightweight, i use nginx. Nuno Magalhães LU#484677 ___ sqlite-users mailing list sqlite-users@sql

[sqlite] httpd server ???

2009-03-17 Thread Ken
This is off topic, but since sqlite list has such savvy folks I thought I'd try here. Does anyone know of an embedded http server that can serve and/or create pages from a sqlite database? Thanks, Ken ___ sqlite-users mailing list sqlite-users@sqli

Re: [sqlite] concat two columns if 2nd non-empty and select first row

2009-03-17 Thread John Machin
On 18/03/2009 8:29 AM, anjela patnaik wrote: > Hello all, > I have a table with multiple columns. I'd like to construct a select > statement that will concat two column values if the second field is non-empty > and also only return one row. > > I noticed the concat operator is not supported. I a

Re: [sqlite] Proposal for SQLite and non pure ASCII letters

2009-03-17 Thread Roger Binns
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 > I'm know. But you can implement locale-dependent version for single language > only. - From the German example, you can't even do that (name order is different than dictionary order). I think we are agreed that the default SQLite implementation g

Re: [sqlite] LEFT INNER JOIN a second database

2009-03-17 Thread Kees Nuyt
Hi Derek, On Mon, 16 Mar 2009 23:19:55 -0700 (PDT), Derek Developer wrote: > Asking question here can often feel > like venturing into the Alamo. Not everyone here is a native English speaker or from a USA/English background. Something that sounds judgemental or even rude to one person is ob

Re: [sqlite] Proposal for SQLite and non pure ASCII letters

2009-03-17 Thread Alexey Pechnikov
Hello! On Tuesday 17 March 2009 22:00:29 Roger Binns wrote: > > You can find locale-independant Unicode extension here: > > http://ioannis.mpsounds.net/blog/2007/12/19/sqlite-native-unicode-like- > > support/ > > > > This work fine for me and about 4x faster than ICU. > > That code should be tidie

[sqlite] concat two columns if 2nd non-empty and select first row

2009-03-17 Thread anjela patnaik
Hello all, I have a table with multiple columns. I'd like to construct a select statement that will concat two column values if the second field is non-empty and also only return one row. I noticed the concat operator is not supported. I also had trouble with ||. For some reason it always retur

Re: [sqlite] parameters

2009-03-17 Thread Clark Christensen
Difficult to read, so it's unclear what your intention is. But you mention JavaScript, so I'll take a stab... Bound parameters can only contain literal values. You can't use a bound parameter as an identifier for a table or column. Do you really mean this: ... WHERE users.user_id = ?

[sqlite] Speed of DROP INDEX

2009-03-17 Thread Nikolas Stevenson-Molnar
Hi, I'm trying to drop an index on a table with about 8 million rows and it's taking a very long time. I can understand why building the index would take some time, but why dropping it? And is there any way to speed it up? Thanks! _Nik ___ sqlite-

Re: [sqlite] Proposal for SQLite and non pure ASCII letters

2009-03-17 Thread Roger Binns
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Alexey Pechnikov wrote: > You can find locale-independant Unicode extension here: > http://ioannis.mpsounds.net/blog/2007/12/19/sqlite-native-unicode-like- > support/ > > This work fine for me and about 4x faster than ICU. That code should be tidied

Re: [sqlite] control buffering of query results

2009-03-17 Thread baxy77bax
P Kishor-3 wrote: > > On Tue, Mar 17, 2009 at 6:44 AM, baxy77bax wrote: >> >> hi >> >> i need help with this one. >> >> i have this perl script that goes something like this: >> >> my $fetchrow_stmt; >> >> sub _fetchrow_stmt { >> >>  my ($self,%arg) = @_; >>  my $stm = "select * from $arg{tabl

Re: [sqlite] parameters

2009-03-17 Thread MikeW
meerkat writes: > > Hello, > > I am trying to bind some parameters in a query but I can't do it. I have the > following (JavaScript in html page): SNIP > > I get an empty result set even though I know that the variables produce a > row (tested in external sql program). > > If anyone can sug

Re: [sqlite] control buffering of query results

2009-03-17 Thread Ken
use the LIMIT clause track and re-run the query when you need the next chunk of data. --- On Tue, 3/17/09, baxy77bax wrote: > From: baxy77bax > Subject: [sqlite] control buffering of query results > To: sqlite-users@sqlite.org > Date: Tuesday, March 17, 2009, 6:44 AM > hi > > i need help

[sqlite] parameters

2009-03-17 Thread meerkat
Hello, I am trying to bind some parameters in a query but I can't do it. I have the following (JavaScript in html page): var rs = db.execute('SELECT distinct '+ 'schedule.schedule_id, ' + 'orders.order_no, '+ 'orders.order_no_iteration, '+ 'organisation.organisation_name, '+ 'str

Re: [sqlite] Advices to get max performance with SQLITE and BLOBS

2009-03-17 Thread Alexey Pechnikov
Hello! On Monday 16 March 2009 09:48:50 Pierre Chatelier wrote: > But we are not answering my initial question ! > > Can I expect some gain in > -recompiling SQLite (which options/DEFINEs would help ?) > -using custom memory allocators (I am on Win32, in a multi-threaded   > environment, and yes,

Re: [sqlite] "Vacuum" command is failing with "SQL Error:Database or disk is full"

2009-03-17 Thread manohar s
Also, In linux whether these temporary files are created while vacuuming? If yes, can you tell me where will this be created? manohar On Tue, Mar 17, 2009 at 6:20 PM, manohar s wrote: > Yes, the solution you suggested is working fine. But can't we change this > through SQLite? > > Thanks and Re

Re: [sqlite] Proposal for SQLite and non pure ASCII letters

2009-03-17 Thread Alexey Pechnikov
Hello! On Thursday 12 March 2009 10:09:28 Roger Binns wrote: > > I was asking the group their opinion about the usefulness of such > > feature. > > As described I think it is mostly useless.  Sorting even just for West > European languages is not trivial.  For example some countries have a > diffe

Re: [sqlite] "Vacuum" command is failing with "SQL Error:Database or disk is full"

2009-03-17 Thread manohar s
Yes, the solution you suggested is working fine. But can't we change this through SQLite? Thanks and Regards, Manohar.S On Wed, Mar 11, 2009 at 12:44 PM, Mihai Limbasan wrote: > manohar s wrote: > > Hi, > > I am trying to execute "PRAGMA page_size=4096; Vacuum;" on a SQLite > DB(Size > > 1.5 GB

Re: [sqlite] IP from number with SQL

2009-03-17 Thread Alexey Pechnikov
Hello! On Sunday 15 March 2009 23:10:02 Roger Andersson wrote: > The SQL below might be out there but I didn't find it and since there might > be other that need to get 32-bit integer IP in a sqlite3 database to the > a.b.c.d format using SQL There is extension for ipv4 http://mobigroup.ru/files/

Re: [sqlite] Index optimization

2009-03-17 Thread D. Richard Hipp
On Mar 17, 2009, at 8:14 AM, Andrea Galeazzi wrote: > I meant: > SELECT title FROM tracks > WHERE title >= :last_title AND > (title>:last_title OR id>:last_id) AND title LIKE %Mad% > ORDER BY title,id; > better than > SELECT title FROM tracks > WHERE title LIKE %Mad% AND > title >= :last_title

Re: [sqlite] Index optimization

2009-03-17 Thread Igor Tandetnik
"Andrea Galeazzi" wrote in message news:49bf943a.8050...@korg.it > I meant: > SELECT title FROM tracks > WHERE title >= :last_title AND > (title>:last_title OR id>:last_id) AND title LIKE %Mad% > ORDER BY title,id; > better than > SELECT title FROM tracks > WHERE title LIKE %Mad% AND > title >=

Re: [sqlite] control buffering of query results

2009-03-17 Thread P Kishor
On Tue, Mar 17, 2009 at 6:44 AM, baxy77bax wrote: > > hi > > i need help with this one. > > i have this perl script that goes something like this: > > my $fetchrow_stmt; > > sub _fetchrow_stmt { > >  my ($self,%arg) = @_; >  my $stm = "select * from $arg{table}"; >  $fetchrow_stmt = $dbh->prepare(

Re: [sqlite] Index optimization

2009-03-17 Thread Andrea Galeazzi
n the index improve select performance in both previous >> cases? >> > > No. These statements won't actually run, and are thus beyond help. > > Igor Tandetnik > > > > ___ > sqlite-users mailing list > sqlite-users@s

Re: [sqlite] Index optimization

2009-03-17 Thread Igor Tandetnik
"Andrea Galeazzi" wrote in message news:49bf6196.5070...@korg.it > Is the order of WHERE clauses important as C-language is? No. The optimizer may, and often does, reorder the conditions in the WHERE clause. > For instance is > > SELECT title FROM tracks > WHERE title ((title=:last_title

[sqlite] control buffering of query results

2009-03-17 Thread baxy77bax
hi i need help with this one. i have this perl script that goes something like this: my $fetchrow_stmt; sub _fetchrow_stmt { my ($self,%arg) = @_; my $stm = "select * from $arg{table}"; $fetchrow_stmt = $dbh->prepare($stm) || die $dbh->errstr; ; $fetchrow_stmt->execute || die

Re: [sqlite] Index optimization

2009-03-17 Thread Andrea Galeazzi
;> >> ___ >> sqlite-users mailing list >> sqlite-users@sqlite.org >> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users >> >> __ NOD32 3939 (20090316) Information __ >> >> This message w

Re: [sqlite] Getting SQLITE_BUSY within a transaction and how tohandle it

2009-03-17 Thread Marcus Grimm
You may also try this: http://www.sqlite.org/cvstrac/wiki?p=SampleCode I did use exclusive transactions there but you may change accordingly and try to fit better in your scenario. If that still doesn't do the job you may post the results here again. hope this helps Marcus Dennis Volodomanov

Re: [sqlite] Index optimization

2009-03-17 Thread Andrea Galeazzi
Is the order of WHERE clauses important as C-language is? For instance is SELECT title FROM tracks WHERE title ((title=:last_title AND id>:last_id) AND LIKE %Mad% better than SELECT title FROM tracks WHERE title LIKE %Mad% AND ((title=:last_title AND id>:last_id) ? Anyway, can the

Re: [sqlite] Getting SQLITE_BUSY within a transaction and how tohandle it

2009-03-17 Thread Dennis Volodomanov
> Are you at least reseting the statement? I hit this once before, and > reseting the statement fixed the issue for me. I tried that, but unfortunately it doesn't help. Thanks, Dennis ___ sqlite-users mailing list sqlite-users@sqlite.org http://sq

Re: [sqlite] Mozilla Firefox 3.0.7 using SQLITE 3.5.9 crash on AIX

2009-03-17 Thread Christian Nassau
Shailendra Jain wrote: > While running Mozilla Firefox 3 on AIX platform, the application crashed > with below stacktrace information. There were some problems on AIX when you compiled sqlite with IBM's native xlc compiler. See for example ticket 3344 http://www.sqlite.org/cvstrac/tktview?tn