On 8/13/06, Mark Wyszomierski <[EMAIL PROTECTED]> wrote:
Hi,

I have been using sqlite on windows for a few months, it is great. I
need to switch over to unicode support now though, and I am confused
how to do this with sqlite.

1) First, when I compiled the original sqlite project, I have the
character set to MBCS. Should I switch this to Unicode and recompile?

I think SQLite explicitly calls CreateFileW but I could be wrong.
Might as well compile as Unicode anyway.

2) I have been using sqlite3_exec() to execute my sql statements, but
I see that there is no sqlite3_exec16() equivalent to take a unicode
string. I think I'm supposed to use sqlite3_prepare16() but I have no
idea what the last two parameters of that function are?

Check the docs, they explain how to use prepared statements.

3) To escape my sql statements I was using sqlite3_mprintf() - is
there a unicode equivalent?

With prepared statements you put placeholders like "?" into your sql
and bind data to the placeholders - no escaping required.

Thanks for any information,
Mark

-----------------------------------------------------------------------------
To unsubscribe, send email to [EMAIL PROTECTED]
-----------------------------------------------------------------------------




--
Cory Nelson
http://www.int64.org

-----------------------------------------------------------------------------
To unsubscribe, send email to [EMAIL PROTECTED]
-----------------------------------------------------------------------------

Reply via email to