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

c++ - llvm function pass ReplaceInstWithInst malloc -

Cross-Compiling Linux Kernel for Raspberry Pi - ${CCPREFIX}gcc -v does not work -

java.lang.NoClassDefFoundError When Creating New Android Project -