Update "Batery" Set "Stock" = 10 + "Stock" Where "idBatery" = 1
I did execute this query in the Postgres and it worked. How do I do the query using C#.
I did try this:
"Update \"Batery\" Set \"Stock\" = " + tbAddStock.Text +"+ \"Stock\" Where \"idBatery\" = "+ tbIdBatery.Text
uning command syntax:
"Update \"Batery\" Set \"Stock\" = (:stock) + \"Stock\" Where \"idBatery\" = (:idbatery)"
And i get an error that say: "Syntax error in or close to <<"Stock">>", in the first case. In the cmd case i get "Cant convert an 'System.String[]' object to 'System.IConvertible'