replying to my own message - i added the step function that i needed...so: sqlite_step(statement), in between the bind and finalize..
i deleted all the entries from the table so i could start over, so when i do a select on Images i get: 1| so either somehow i cant see the contents of the blob or there is nothing there at all. any suggestions? --- C S <[EMAIL PROTECTED]> wrote: > Dennis mentioned before that it was not necessary to > do a bind on something that was defined as an > integer > primary key. > > when i do: > > select * from Images; > > 1| > 2| > > thats pretty much it. there are two entries because > i > tried to pure void cast as the previous message > suggest vs the char * way..and it "seems" to make no > difference. > > if i am supposed to bind the imageID what would that > bind look like? which bind statement am i looking > for? > thanks!! > --- "Matthew L. Creech" <[EMAIL PROTECTED]> wrote: > > > On Wed, Mar 12, 2008 at 9:37 AM, C S > > <[EMAIL PROTECTED]> wrote: > > > > > > myString = "insert into Images(imageID, > > imageData) > > > values(?, ?); > > > > > > > > > status = sqlite3_prepare_v2(db, > myString.c_str(), > > -1, > > > &statement, NULL); > > > > > > void *blob = reinterpretcast<char > *>(imageArray); > > > > > > > > > status = sqlite3_bind_blob(statement, 2, blob, > 10 > > * > > > sizeof(unsigned short), SQLITE_STATIC); > > > > > > statusu = sqlite3_finalize(statement); > > > > > > return sqlite3_last_insert_row(db); > > > > > > **************************** > > > > > > however when i do: > > > > > > select * from Images; > > > > > > i get no results returned to me. i just get > > returned > > > to the prompt. is there anything that i missed? > > thanks > > > again!!! > > > > > > > You're missing a bind for the first column (the > > imageID), and more > > importantly, a call to sqlite3_step() - you do > need > > one, otherwise the > > insert never executes. :) > > > > -- > > Matthew L. Creech > > _______________________________________________ > > sqlite-users mailing list > > sqlite-users@sqlite.org > > > http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users > > > > > > > ____________________________________________________________________________________ > Be a better friend, newshound, and > know-it-all with Yahoo! Mobile. Try it now. > http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ > > > _______________________________________________ > sqlite-users mailing list > sqlite-users@sqlite.org > http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users > ____________________________________________________________________________________ Be a better friend, newshound, and know-it-all with Yahoo! Mobile. Try it now. http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users