Thomas Phan - 2002-09-21

Logged In: YES
user_id=409109

Looked at mysql's CAPI, we may need to use
mysql_escape_string for bytes

[DllImport("libmySQL.dll",
CharSet=System.Runtime.InteropServices.CharSet.Ansi,
EntryPoint="mysql_escape_string", ExactSpelling = true)]

private static extern int EscapeStringInternal(IntPtr to, IntPtr
from, uint length);

and the SQL error is due to the difference between
command's unicode and char* lengths.

MySql.RealQuery(_connection._mysql, _cmds
[_currentCommand], (uint)_cmds[_currentCommand].Length)
^^^
MySqlDataReader::NextResult

For bytes that may include 0 (end of string char), I suggest
that MySqlCommand::ParseCommand() to return byte[][] (or
a collection of byte[])

Thanks

Thomas