Mahalakshmi.m
<[EMAIL PROTECTED]>
wrote:
>  unsigned short ArtistName;
> sqlite3_bind_text16(insert,1,ArtistName,-1,SQLITE_STATIC);

Doesn't compile. The third parameter of sqlite3_bind_text16 is a void*, 
and you are passing unsigned short there. You might have meant 
&ArtistName, except that the length is wrong then: you do not have a 
NUL-terminated buffer.

Also, I don't see you actually initialize ArtistName anywhere. Did you 
actually mean to put some random garbage value into the database?

Also, you are only inserting a single row. How do you plan to 
demonstrate incorrect sorting order with just one row?

> unsigned char * Name = sqlite3_column_text16(select, 0 );

sqlite3_column_text16 gives you a pointer to a Unicode (wide) string, 
not a char* (narrow) string.

> For this I got wrong output..

Not at all surprising.
-- 
With best wishes,
    Igor Tandetnik

With sufficient thrust, pigs fly just fine. However, this is not 
necessarily a good idea. It is hard to be sure where they are going to 
land, and it could be dangerous sitting under them as they fly 
overhead. -- RFC 1925



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

Reply via email to