[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Chicken-users] Inserting Binary Data with sql-de-lite
From: |
Jim Ursetto |
Subject: |
Re: [Chicken-users] Inserting Binary Data with sql-de-lite |
Date: |
Mon, 22 Jun 2015 16:36:52 -0500 |
Andy,
What if you convert the string to a blob before passing it in?
Jim
> On Jun 22, 2015, at 12:16, Andy Bennett <address@hidden> wrote:
>
> Hi,
>
> I'm using a parameterized statement to insert binary data into sql-de-lite
> (0.6.6) on CHICKEN 4.10rc1.
>
> When I call sql-de-lite's exec procedure I get:
>
> -----
> Error: (##sys#make-c-string) cannot represent string with NUL bytes as C
> string: "╴╴\x00...
>
> ...
>
> Call history:
>
> sql-de-lite.scm:459: lru-cache#lru-cache-capacity
> sql-de-lite.scm:188: ##sys#block-set!
> sql-de-lite.scm:461: lru-cache#lru-cache-set!
> sql-de-lite.scm:175: ##sys#block-set!
> sql-de-lite.scm:567: bind-parameter-count
> sql-de-lite.scm:581: keyword?
> sql-de-lite.scm:583: bind
> sql-de-lite.scm:594: %bind-int
> sql-de-lite.scm:605: bind-parameter-count
> sqlite3-api.scm:155: ##sys#make-c-string
> sql-de-lite.scm:584: loop
> sql-de-lite.scm:581: keyword?
> sql-de-lite.scm:583: bind
> sql-de-lite.scm:594: %bind-int
> sql-de-lite.scm:605: bind-parameter-count
> sqlite3-api.scm:155: ##sys#make-c-string <--
> -----
>
>
> What's the recommended way to do or fix this? In the CHICKEN 4.7 days I have
> taken binary data *out* of SQLite but I've not done it since the NUL-string
> problems were addressed.
>
> The data gets into CHICKEN by reading it from a port using http-client.
>
>
> Thanks for your help.
>
> Sorry I'm light on details: I can send more sensible stuff on request.
>
>
>
> --
> address@hidden
> http://www.ashurst.eu.org/
> http://www.gonumber.com/andyjpb
> 0x7EBA75FF
>
> _______________________________________________
> Chicken-users mailing list
> address@hidden
> https://lists.nongnu.org/mailman/listinfo/chicken-users