Re: [sqlite] using SQLite for binding blobs.

2008-02-15 Thread Igor Tandetnik
"C S" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > what do you mean no parameters in SQL? http://sqlite.org/c3ref/bind_blob.html It explains parameters Igor Tandetnik ___ sqlite-users mailing list sqlite-users@sqlite.org http://sql

Re: [sqlite] using SQLite for binding blobs.

2008-02-15 Thread C S
sorry that should have been insert not insert2, sorry for the confusion. what do you mean no parameters in SQL? again sorry for sounding noobish -- well fact of the matter is i am. ive learned as much as i have in 2 days so thanks for the patience and the string suggestion. --- Igor Tandetnik

Re: [sqlite] using SQLite for binding blobs.

2008-02-15 Thread Igor Tandetnik
"C S" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > insert << "insert into Images values(NULL, '" << Hello > World << "')" As predicted, you don't have any parameters in your SQL, so there's nothing to bind. It's also not clear why you use a stream. You probably want something li

Re: [sqlite] using SQLite for binding blobs.

2008-02-15 Thread C S
Ken, thanks for your response. for cross platform, both windows and linux are little endian and Macs now use intel chips, so that is not an issue. i was just making sure everyone knew i wasnt just developing for windows. about storing them as shorts -- i was under the impression(at first) that

Re: [sqlite] using SQLite for binding blobs.

2008-02-15 Thread C S
this is to all who have responded so far: thanks so much for your help so far: as a caveat, i am new to SQL so bear with me.. here is my code from the main.cpp where i build the short array: ostringstream insert; unsigned short *blobarray = new unsigned short[10]; //for simple purposes i will

Re: [sqlite] using SQLite for binding blobs.

2008-02-15 Thread Ken
In addition to what Igor mentions: If you want this array to be cross platform portable from Big endian to Little endian you either need to store some type of endianness flag. If you dig into the sqlite source you'll find a function like sqlite3_put_varint. It will convert 32 bit or 64 bit uns

Re: [sqlite] using SQLite for binding blobs.

2008-02-15 Thread Fin Springs
On Feb 15, 2008, at 5:40 PM, C S usmsci-at-yahoo.com |sqlite| wrote: > hi all i have a question regarding Blobs, that is > storing images into the database. > > my image by default is an unsigned short array and to > bind blobs it wants a byte array. i am not sure i am > doing this right at all.

Re: [sqlite] using SQLite for binding blobs.

2008-02-15 Thread Igor Tandetnik
C S <[EMAIL PROTECTED]> wrote: > hi all i have a question regarding Blobs, that is > storing images into the database. > > my image by default is an unsigned short array and to > bind blobs it wants a byte array. i am not sure i am > doing this right at all. is there a universal cross > platform wa

[sqlite] using SQLite for binding blobs.

2008-02-15 Thread C S
hi all i have a question regarding Blobs, that is storing images into the database. my image by default is an unsigned short array and to bind blobs it wants a byte array. i am not sure i am doing this right at all. is there a universal cross platform way for this easy conversion? so far the co