C#------sql特殊字符的处理
publicDataViewSelctCommand_Customer_where(stringsqltype,stringsqlstring){if(sqltype==...
public DataView SelctCommand_Customer_where(string sqltype,string sqlstring)
{
if(sqltype=="PaperNumber")
{
connection.sqlDataAdapter=new SqlDataAdapter ( SELECT * From Customer
where PaperNumber like '%"+sqlstring+"%')
}
}
如果传进的sqlstring中有特出字符怎么处理?? 展开
{
if(sqltype=="PaperNumber")
{
connection.sqlDataAdapter=new SqlDataAdapter ( SELECT * From Customer
where PaperNumber like '%"+sqlstring+"%')
}
}
如果传进的sqlstring中有特出字符怎么处理?? 展开
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询