[plt-scheme] How to use sqlite?

From: Keith Frost (keith.l.frost at gmail.com)
Date: Sun Feb 22 17:57:15 EST 2009

I came across a crash like this running under 32-bit Windows XP as well.
But not on 32-bit Linux.

Keith Frost

On Thu, Feb 19, 2009 at 7:57 PM, Jay McCarthy <jay.mccarthy at gmail.com>wrote:

> I just found a segfault with finalize on 64-bit linux. Is that what
> you're using?
>
> I haven't been able to figure out the solution yet though.
>
> Jay
>
> On Thu, Feb 19, 2009 at 10:22 PM,  <synx13+plt at gmail.com<synx13%2Bplt at gmail.com>>
> wrote:
> > My code it is broke. The following example script seems to segfault any
> > plt executable, when using (planet jaymccarthy/sqlite:3). I know the
> > point of prepared statements is being able to run them twice, so not
> > sure what I'm doing wrong here.
> >
> > #lang scheme
> >
> > (require (prefix-in sqlite3: (planet jaymccarthy/sqlite:3)))
> >
> > (let ((db (sqlite3:open ':memory:)))
> >  (sqlite3:exec/ignore db "CREATE TABLE foo (id INTEGER PRIMARY KEY, bar
> INTEGER, baz TEXT);")
> >  (let ((insert-statement (sqlite3:prepare db "INSERT INTO foo (bar,baz)
> VALUES (?,?);")))
> >    (sqlite3:run insert-statement 2 "two")
> >    (sqlite3:reset insert-statement) ; eww
> >    (display "Hmm..\n")
> >    (sqlite3:run insert-statement 3 "three")
> >    (display "HMM..\n")
> >    (sqlite3:finalize insert-statement)) ; ewwww
> >    (sqlite3:close db))
> > _________________________________________________
> >  For list-related administrative tasks:
> >  http://list.cs.brown.edu/mailman/listinfo/plt-scheme
> >
> >
>
>
>
> --
> Jay McCarthy <jay at cs.byu.edu>
> Assistant Professor / Brigham Young University
> http://teammccarthy.org/jay
>
> "The glory of God is Intelligence" - D&C 93
> _________________________________________________
>  For list-related administrative tasks:
>  http://list.cs.brown.edu/mailman/listinfo/plt-scheme
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.racket-lang.org/users/archive/attachments/20090222/81c99dc0/attachment.html>

Posted on the users mailing list.