//如果你点击一行,它将被删除
string sqlStr = "DELETE from Members MemberID, FirstName, LastName, Phone, Mobile, Email, Address, Suburb, City, PostalCode, DateJoined;";
sqlStr += "WHERE rowid=@Rowid;";
//如果你点击一行,它将被删除
string sqlStr = "DELETE from Members MemberID, FirstName, LastName, Phone, Mobile, Email, Address, Suburb, City, PostalCode, DateJoined;";
sqlStr += "WHERE rowid=@Rowid;";
string sqlStr = "DELETE from Members WHERE rowid=@Rowid";
DELETE 操作的语法不需要包含列名。
DELETE FROM <table_name> WHERE <condition>
在你的情况下,
string sqlStr = "DELETE from Members WHERE rowid=@Rowid";
我假设您已经@Rowid
声明并指定为SqlParameter
根据您的代码,您应该这样做:
string sqlStr = "DELETE from Members";
sqlStr += " WHERE rowid=@Rowid;";
我认为您应该删除;
第一行的 at 和。并删除这些字段名称。
只需使用
"delete from members where rowid=@Rowid"