[RESOLVED] Help with SQL in C#
Hello everyone,
I have a piece of code here that doesn't appear to work, and I think I know why, but I just can't get my head around a way to fix it. I'm am making a select statement from a database and doing a string comparison:
<code>
comm.CommandText = "SELECT Insurance_Company_Number, Insurance_Company_Name FROM TABLE_Insurance_Company WHERE Insurance_Company_Number = 'Hudson's Bay Co (Toronto)'";
</code>
Now, I'm certain the problem arises because of the apostrophe in Hudson's screwing around with the string, is there an escape sequence that I can use to use the ' as part of the string?
The error that comes up is:
Syntax Error (missing operator) in query expression 'Insurance_Company_Number = 'Hudson's Bay Co (Toronto)"