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

Popular posts from this blog

get url and add instance to a model with prefilled foreign key :django admin -

css - Make div keyboard-scrollable in jQuery Mobile? -

ruby on rails - Seeing duplicate requests handled with Unicorn -