C#中查询数据库
string sql="select * from zonghe where barcode=region"
zonghe为数据表名,在数据表中barcode列的类型为nchar(10),region为string类型,通过switch语句赋值
请问 我这样做有什么错误
string sql="select * from zonghe where barcode=region"
zonghe为数据表名,在数据表中barcode列的类型为nchar(10),region为string类型,通过switch语句赋值
请问 我这样做有什么错误
string sql="select * from zonghe where barcode= ‘region’"
comm1.Parameters.AddWithValue("@region", region);