javadsaghi
دوشنبه 27 آبان 1392, 13:00 عصر
سلام به دوستان
من دستور update رو بصورت زیر نوشتم اما خطای Incorrect syntax near the keyword 'value'
میده!!! :متفکر:
string path = Server.MapPath(".");
SqlConnection con = new SqlConnection();
con.ConnectionString = System.Configuration.ConfigurationManager.Connecti onStrings["adakdbConnectionString1"].ConnectionString;
SqlCommand cmd = new SqlCommand();
cmd.CommandType = System.Data.CommandType.Text;
cmd.CommandText = "update GozareshBazdidNazar set values (N' " + tb_vaziat.Text + " ' , N' " + tb_code_poroje.Text + " ', N' " + ddl_onvane_poroje.Text + " ' , N' " + tb_pishrafte_fiziki.Text + " ' , N' " + tb_tarikhe_akharin_bazdid.Text + " ' , N' " + ddl_mokatebat.Text + "' , N' " + ddl_mokatebat.Text + " ' , N' " + path + "\\" + ddl_ostan.Text + "\\" + ddl_shahr.Text + "\\" + ddl_tarh.Text + "\\" + ddl_onvane_poroje.Text + "\\" + tb_tarikhe_akharin_bazdid.Text + " ' , N' " + tb_tozihat.Text + " ' ) where cod_poroje = '" + tb_code_poroje.Text + "'";
cmd.Connection = con;
con.Open();
( if (cmd.ExecuteNonQuery() == 1
("بروز رساني با موفقيت انجام شد")Response.Write
else
("خطا در انجام بروز رساني روي داده است") Response.Write;
() con.Close
من دستور update رو بصورت زیر نوشتم اما خطای Incorrect syntax near the keyword 'value'
میده!!! :متفکر:
string path = Server.MapPath(".");
SqlConnection con = new SqlConnection();
con.ConnectionString = System.Configuration.ConfigurationManager.Connecti onStrings["adakdbConnectionString1"].ConnectionString;
SqlCommand cmd = new SqlCommand();
cmd.CommandType = System.Data.CommandType.Text;
cmd.CommandText = "update GozareshBazdidNazar set values (N' " + tb_vaziat.Text + " ' , N' " + tb_code_poroje.Text + " ', N' " + ddl_onvane_poroje.Text + " ' , N' " + tb_pishrafte_fiziki.Text + " ' , N' " + tb_tarikhe_akharin_bazdid.Text + " ' , N' " + ddl_mokatebat.Text + "' , N' " + ddl_mokatebat.Text + " ' , N' " + path + "\\" + ddl_ostan.Text + "\\" + ddl_shahr.Text + "\\" + ddl_tarh.Text + "\\" + ddl_onvane_poroje.Text + "\\" + tb_tarikhe_akharin_bazdid.Text + " ' , N' " + tb_tozihat.Text + " ' ) where cod_poroje = '" + tb_code_poroje.Text + "'";
cmd.Connection = con;
con.Open();
( if (cmd.ExecuteNonQuery() == 1
("بروز رساني با موفقيت انجام شد")Response.Write
else
("خطا در انجام بروز رساني روي داده است") Response.Write;
() con.Close