string UpdateStr="Update Suppliers set"
+"CompanyName= '"+CompanyName+"',ContactName='"+ContactName+"',ContactTitle='"+ContactTitle+"',Address='"+Address+"',City='"+City+"',Region='"+Region+"',PostalCode='"+PostalCode+"',Country='"+Country+"',Phone='"+Phone+"',Fax='"+Fax+"',HomePage='"+HomePage+"'+where SupplierID = "+SupplierID;
能不能告诉我在ASP。NET中插入SQL语句应该怎么写,什么时候加空格,什么时候用什么样的引号呀
+"CompanyName= '"+CompanyName+"',ContactName='"+ContactName+"',ContactTitle='"+ContactTitle+"',Address='"+Address+"',City='"+City+"',Region='"+Region+"',PostalCode='"+PostalCode+"',Country='"+Country+"',Phone='"+Phone+"',Fax='"+Fax+"',HomePage='"+HomePage+"'+where SupplierID = "+SupplierID;
能不能告诉我在ASP。NET中插入SQL语句应该怎么写,什么时候加空格,什么时候用什么样的引号呀
+"CompanyName= '"+CompanyName+"',ContactName='"+ContactName+"',ContactTitle='"+ContactTitle+"',Address='"+Address+"',City='"+City+"',Region='"+Region+"',PostalCode='"+PostalCode+"',Country='"+Country+"',Phone='"+Phone+"',Fax='"+Fax+"',HomePage='"+HomePage+"' where SupplierID = "+SupplierID;
1)HomePage='"+HomePage+"' where SupplierID = "+SupplierID;
2)="Update Suppliers set "
where这里不是明显少了个空格吗?
SQL变成 ...HomePage='XXXX'where SupplierID =....
where前面这里没有空格 !!