0

help me with this error pls. you have an eror your sql syntax; check the manual taht corresponds to your mysql server for the right sytax to use near

    cmd = new MySqlCommand(
                      "UPDATE products SET (prodid = @prodID,  prodname = @prodName,  unitprice = @unitPrice,  qtyonhand = @qtyOnHand) WHERE prodid = @prodid", conn);
                    cmd.Parameters.Add("@prodID", MySqlDbType.VarChar).Value = product.ID;
                    cmd.Parameters.Add("@prodName", MySqlDbType.VarChar).Value = product.Name;
                    cmd.Parameters.Add("@unitPrice", MySqlDbType.VarChar).Value = product.UnitPrice;
                    cmd.Parameters.Add("@qtyOnHand", MySqlDbType.VarChar).Value = product.QtyOnHand;
2
Contributors
2
Replies
3
Views
5 Years
Discussion Span
Last Post by ironman99
This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.