Greetings.

I have this table,

CREATE TABLE Test (login primary key, password);

and I would like to save zlib data using ubyte[] and also call it back in.  I 
have things like this:
1. To save in SQLite,
    cmd =
    "  UPDATE Test password = " ~ 
cast(char[])cast(ubyte[])std.zlib.compress(cast(void[])"password") ~
    "        WHERE login = 'test';"; 

This works, or at least, it saves in SQlite, but when I call it back, it does 
not.

2. To call it in SQLite,

char[] passWord = 
cast(char[])cast(ubyte[])std.zlib.uncompress(cast(void[])r[0]["password"]);

where r[0]["password"] is what I just SELECTED from SQlite.  I am getting an 
UTF8 error.  This is a D program, so, the syntax may not be known to some or 
all of you.  However, the more realistic SQLite question would be, how can I 
save ubyte data in SQLite and also call it back.  Thoughts?  Comments?  Jokes? 
:-)

thanks.

josé

_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to