[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Chicken-users] Re: sqlite3 issues
From: |
elf |
Subject: |
Re: [Chicken-users] Re: sqlite3 issues |
Date: |
Wed, 8 Nov 2006 09:09:27 -0500 (EST) |
if sqlite3 itself is compiled in threadsafe mode, the egg will cause an
immediate crash.
-elf
On Wed, 8 Nov 2006, Thomas Christian Chust wrote:
> Alejandro Forero Cuervo wrote:
>
> > [...]
> > However, I'm failing to get the sqlite3:for-each-row function from
> > Chicken's sqlite3 egg to execute for some queries:
> > [...]
> > #;5> (sqlite3:for-each-row (constantly #f) db "DELECT FROM links;")
> > Error: (sqlite3:prepare) unrecognized token: ""
> > #<sqlite3:database>
> > "DELECT FROM links;"
> >
> > Call history:
> >
> > <eval> (sqlite3:for-each-row (constantly #f) db
> > "DELECT FROM links;")
> > <eval> (constantly #f) <--
> > [...]
>
> Hello Alejandro,
>
> the error you posted is apparently thrown by the SQLite3 SQL parser due
> to the fact that DELECT is not a valid SQL command. At least on my machine
>
> (require-extension sqlite3)
> (define db (sqlite3:open ":memory:"))
> (sqlite3:exec db "CREATE TABLE links(foo TEXT);")
> (sqlite3:for-each-row (constantly #f) db "DELETE FROM links;")
> (sqlite3:finalize! db)
>
> works just fine.
>
> By the way, if you don't process the results of the SQL statements you
> execute anyway, then using sqlite3:exec or sqlite3:update instead of
> sqlite3:for-each-row or sqlite3:map-row is more efficient.
>
> Did you also experience the same or similar problems with any SQL
> statement that is valid, i.e. executes correctly, say, from the sqlite3
> command line program? If yes, please send me those example(s) and I will
> investigate the problem further.
>
> cu,
> Thomas
>
>
> _______________________________________________
> Chicken-users mailing list
> address@hidden
> http://lists.nongnu.org/mailman/listinfo/chicken-users
>
>
-----
Humans always do the most intelligent thing after every stupid alternative
has failed. -- R. Buckminster Fuller
A year spent in artificial intelligence is enough to make one believe in G-d.
-- Alan Perlis