From: David Pirotte <david@altosw.be>
To: Detlev Zundel <dzu@denx.de>
Cc: Andy Wingo <wingo@pobox.com>, guile-devel@gnu.org
Subject: Re: Problems with guile-sqlite3
Date: Fri, 1 Apr 2011 20:05:51 -0300 [thread overview]
Message-ID: <20110401200551.2f7c4135@rascar> (raw)
In-Reply-To: <m2zkoafi8s.fsf@ohwell.denx.de>
[-- Attachment #1: Type: text/plain, Size: 644 bytes --]
Le Fri, 01 Apr 2011 11:12:03 +0200,
Detlev Zundel <dzu@denx.de> a écrit :
> Hi David,
>
> > Just tried guile-sqlite3 - after applying the 2 patches of Detlev - and
> > succeeded with
> > ...
> Thanks for testing. Unfortunately currently I'm not able to reproduce
> your findings - in my little test I was successful in reading records
> from a small database.
>
> Can you show me the exact calls and the database you used?
Hello Detlev,
Andy,
I spotted where the problem comes from: it is when a text value is empty. I have
produced a small but complete example [attached]: can you reproduce it ?
Thanks,
David
[-- Attachment #2: empty-string.scm --]
[-- Type: text/x-scheme, Size: 928 bytes --]
(define-module (empty-string)
:use-module (ice-9 format)
:use-module (sqlite3))
(export db
create
insert
query-1
query-2
stmt)
(define stmt #f)
#!
April the 1st, 2011
origin/HEAD -> origin/master
origin/master
Retreiving an empty string triggers an error
!#
;;;
;;; Opening a test db
;;;
(define db (sqlite-open "/tmp/sqlite.db" 6))
(define create
"create table test (
reference integer primary key,
name text,
firstname text,
email text
);")
(define insert
"insert into test
values (1,'BLAISE','Virginie','');")
(define query-1 "select reference, name, firstname from test;")
(define query-2 "select * from test;")
(for-each (lambda (sql-stmt)
(set! stmt (sqlite-prepare db sql-stmt))
(format #t "~S~%" (sqlite-step stmt))
(sqlite-finalize stmt))
(list create
insert
query-1
query-2))
;;;
;;; Closing
;;;
(sqlite-close db)
next prev parent reply other threads:[~2011-04-01 23:05 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-03-30 22:52 Problems with guile-sqlite3 Detlev Zundel
2011-03-31 10:25 ` Andy Wingo
2011-03-31 14:03 ` Detlev Zundel
2011-03-31 16:18 ` Detlev Zundel
2011-04-01 5:33 ` David Pirotte
2011-04-01 9:12 ` Detlev Zundel
2011-04-01 23:05 ` David Pirotte [this message]
2011-04-04 16:22 ` Detlev Zundel
2011-04-04 20:50 ` Andy Wingo
2011-04-04 21:28 ` Detlev Zundel
2011-04-11 15:05 ` Detlev Zundel
2011-04-20 15:22 ` David Pirotte
2011-04-20 15:51 ` Detlev Zundel
2011-04-21 12:17 ` Andy Wingo
2011-04-21 21:58 ` David Pirotte
2011-04-01 11:34 ` Andy Wingo
2011-04-01 14:33 ` Detlev Zundel
2011-04-01 14:49 ` Andy Wingo
2011-03-31 14:28 ` Ludovic Courtès
2011-03-31 14:54 ` Andy Wingo
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/guile/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20110401200551.2f7c4135@rascar \
--to=david@altosw.be \
--cc=dzu@denx.de \
--cc=guile-devel@gnu.org \
--cc=wingo@pobox.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).