>               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?

---
()  ascii ribbon campaign against html e-mail
/\  www.asciiribbon.org

> -----Original Message-----
> From: sqlite-users-boun...@sqlite.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;");
> 
> 
>               sqlite3_prepare(l_db,sql,-1,&stat,0);
>               char *uu1="bb";
>               char *uu2="Öйú";
> 
> 
>               HINSTANCE mod;
>               Connect foo;
>               mod = LoadLibrary("crypto.dll");
>               printf("1successful load dll1\n");
>               printf("2successful load dll2\n");
>               printf("3successful load dll3\n");
>               printf("4successful load dll4\n");
>               if((foo = (Connect)GetProcAddress(mod, "CryptMe")) != NULL)
>                       {
>                       printf("5successful load dll5\n");
>                       foo(uu1,uu2,1);                           //here to 
> encode
> the uu2 to " Íð¦·"
>                       }
> 
> 
>               printf("%s\n",uu2);                   //the result:    " Íð¦·"
> 
>               printf("7successful load dll7\n");
>               sqlite3_bind_text(stat,1,uu2,140,NULL);
>               printf("8successful load dll8\n");
>               sqlite3_step(stat);
>               printf("9successful load dll9\n");                 //here not
> print, shou the error msg:  jii.exe has encountered a problem and needs to
>                                                   //close.  We are sorry for 
> the
> inconvenience.
>               sqlite3_finalize(stat);
>               printf("10successful load dll10\n");
> _______________________________________________
> sqlite-users mailing list
> sqlite-users@sqlite.org
> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users



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

Reply via email to