c# - How to insert data into SQL Server? -
i have code this:
con.open(); cmd = new sqlcommand("insert penawaran (id_paket,jenis_paket,harga_paket) values (@id_paket,@jenis_paket,@harga_paket", con); cmd.parameters.addwithvalue("@id_paket", txtidpaket.text); cmd.parameters.addwithvalue("@jenis_paket", txtjenispaket.text); cmd.parameters.addwithvalue("@harga_paket", txthargapaket.value); // int sir how insert it, still error write cmd.executenonquery(); con.close();
please me inside int table paket
.
there missing parenthesis @ end of insert
query
insert penawaran (id_paket,jenis_paket,harga_paket) values (@id_paket,@jenis_paket,@harga_paket) --here
Comments
Post a Comment