Re: [sqlite] sqlite3_stat problem (YAN HONG YE)

2012-08-02 Thread Rob Richardson
lite-users-boun...@sqlite.org] On Behalf Of YAN HONG YE Sent: Thursday, August 02, 2012 3:20 AM To: sqlite-users@sqlite.org Subject: Re: [sqlite] sqlite3_stat problem (YAN HONG YE) sqlite3_bind_text(stat,1,uu2,140,NULL); change to sqlite3_bind_blob(stat,1,uu2,140,NULL); it's ok!

Re: [sqlite] sqlite3_stat problem (YAN HONG YE)

2012-08-02 Thread YAN HONG YE
sqlite3_bind_text(stat,1,uu2,140,NULL); change to sqlite3_bind_blob(stat,1,uu2,140,NULL); it's ok! thank you! ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] sqlite3_stat problem

2012-08-01 Thread Rob Richardson
Return values are your friends. Use them. Store the error code from every sqlite function call, and if the error code is not SQLITE_OK (NOTE: Check that that is the correct name.), then display what the error code is. In particular, what is the return value of your sqlite3_bind_text()

Re: [sqlite] sqlite3_stat problem

2012-07-31 Thread Keith Medcalf
>> sqlite3_bind_text(stat,1,uu2,140,NULL); > uu2 is 4 bytes, not 140; are you sure that it is valid UTF-8 text and not a > blob-o-bytes? It may also be SQLITE_TRANSIENT rather than SQLITE_STATIC ... --- () ascii ribbon campaign against html e-mail /\ www.asciiribbon.org

Re: [sqlite] sqlite3_stat problem

2012-07-31 Thread Keith Medcalf
qlite.org [mailto:sqlite-users- > boun...@sqlite.org] On Behalf Of YAN HONG YE > Sent: Tuesday, 31 July, 2012 19:30 > To: sqlite-users@sqlite.org > Subject: [sqlite] sqlite3_stat problem > > sprintf(sql,"insert into student select 1,?,22;"); > > >

[sqlite] sqlite3_stat problem

2012-07-31 Thread YAN HONG YE
sprintf(sql,"insert into student select 1,?,22;"); sqlite3_prepare(l_db,sql,-1,,0); char *uu1="bb"; char *uu2="Öйú"; HINSTANCE mod; Connect foo; mod