Hello all.
I have a SQLCommand :
"Update Customers Set Name = @name where code = @code"
and this code:
cmd.Parameters[0].Value = "بهروز";//(some Unicode characters)
cmd.Parameters[1].Value = 1;
cmd.ExecuteNonQuery();
or this code:
UpdateCommand.CommandText = "UPDATE [Customers] SET [Name] = @p1 WHERE (([Code] = @p2) AND ((@p3 = 1 AND [Name] IS NULL) OR ([Name] = @p4)))";
UpdateCommand.Parameters.Add("@p1", System.Data.SqlDbType.SmallInt, 0, "Name");
UpdateCommand.Parameters.Add("@p2", System.Data.SqlDbType.NVarChar, 0, "Code");
UpdateCommand.Parameters.Add("@p3", System.Data.SqlDbType.NText, 0, "Name");
UpdateCommand.Parameters.Add("@p4", System.Data.SqlDbType.SmallInt, 0, "Name");
and when I Select Customers Table I have lots of "?"s.
why does SQLCommand work Correct when working with a SQLDataAdapter?
How can i convert my Unicode Data to ANSI?
edit:
in other words :
what code does SQLDataAdapter use?
anyone has the source code of that part of .net framework?