问题
I would like to get the data base on following SQL Statement and that was located in TableAdapter.
SELECT * FROM Student WHERE Chinese_Name = @Param
Example code call from C# is like this.
GetDataByChinese_Name('你好');
But I have no idea where should I put the N prefix in that syntax. Usually, we can get
SELECT * FROM Student WHERE Chinese_Name = N'你好'
this way.
回答1:
Your c# code should be slightly different. Use verbatim string literal.(msdn)
GetDataByChinese_Name(@"你好");
来源:https://stackoverflow.com/questions/15333226/how-to-select-the-data-by-unicode-where-condition