0
喜我嘗試從一個數據庫更新從Windows點,但林不知道我是怎麼從一個變量「totalPoints」被插入到「點」字段中,從數據庫中infromation更新SQL查詢
using (OleDbConnection conn = new OleDbConnection(strCon))
{
String sqlPoints = "UPDATE points FROM customer WHERE [customerID]="
+ txtCustomerID.Text;
conn.Open();
conn.Close();
}
感謝您的幫助!
好的,謝謝il將其更改爲參數化查詢!我如何讓它更新表中的所有字段,例如從0到25? – Bunion
這就是你的意思:更新顧客SET分數= 25 WHERE customerid = 1 – sgeddes