Igor Tandetnik wrote:

>I'm not sure I understand. What exactly are you doing differently in these
>two cases? Can you quote the exact code that fails, in full?

#include <stdio.h>
#include <sqlite3.h>

int main() 
{
  sqlite3* db;
  sqlite3_stmt* insert; 
 unsigned short ArtistName;
  sqlite3_open(" mysqlite.db ", &db);

  sqlite3_exec(db, "pragma encoding = UTF16", 0, 0, 0);
  sqlite3_exec(db, "create table ARTIST(id  integer primary key not null ,
ArtistName  test not null collate nocase )", 0, 0, 0);
 
 sqlite3_prepare(db,"INSERT INTO ARTIST (ArtistName)
VALUES(?);",-1,&insert,0);
 sqlite3_bind_text16(insert,1,ArtistName,-1,SQLITE_STATIC);
 sqlite3_step(insert);
 sqlite3_finalize(insert);

  sqlite3_stmt* select;
  sqlite3_prepare(db, " select  ArtistName  from ARTIST  order by
ArtistName  ", -1, &select, 0);
  while (sqlite3_step(select) == SQLITE_ROW) 
 {
    unsigned char *  Name = sqlite3_column_text16(select,  0 );
    printf("text= %s  \n", Name );
  }
  sqlite3_finalize(select);
  sqlite3_close(db);
  return 0;
}

For this I got wrong output..

Thanks & Regards,
Mahalakshmi


_______________________________________________
sqlite-users mailing list
[email protected]
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to