Re: newbie in C# 2003, saving Asian characters to database problem

Tech-Archive recommends: Speed Up your PC by fixing your registry



HibernatingBear <letmesleep@xxxxxxxxxxx> wrote:
Changed from converting to bytes to using the following sql string to
insert text, and I'm still getting the "???"

string sql = "INSERT INTO MyTable"
+ " (Comment1)"
+ " VALUES (" txtComment.Text + "')";

It works fine for English. At this point, I'm just plain out of
ideas. On another bulletin board, found one guy who had a similar
problem, but the helper chose to delete his solution -- the post was
dated 2002, but looked like it would've helped if it was left up.

Don't put the parameter in the command directly in the SQL like that -
use a parameterised command. That may well help.

--
Jon Skeet - <skeet@xxxxxxxxx>
http://www.pobox.com/~skeet Blog: http://www.msmvps.com/jon.skeet
If replying to the group, please do not mail me too
.