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;

Remove parentheses from sql query this ( and this ).

thank you sir Bonca

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.