SqlCommand UpdateCommand = new SqlCommand("Update Stock Set ConfigID = @ConfigID , Quantity = @Quantity ,TotalPrice =@TotalPrice, StockDate =@StockDate ,Where StockID='" + txtStockID.Text + "'"); UpdateCommand.Connection = con; UpdateCommand.Parameters.Add("@ConfigID",SqlDbType.Int).Value= txtConfigID.Text; UpdateCommand.Parameters.Add("@Quantity", SqlDbType.Int).Value = txtQty.Text; UpdateCommand.Parameters.Add("@TotalPrice", SqlDbType.Int).Value = txtTotalPrice.Text; UpdateCommand.Parameters.Add("@StockDate", SqlDbType.NVarChar, 50).Value = dtpStockDate.Value; con.Open(); UpdateCommand.ExecuteNonQuery(); Con.Close();
,
SqlCommand UpdateCommand = new SqlCommand("Update Stock Set ConfigID = @ConfigID , Quantity = @Quantity ,TotalPrice =@TotalPrice, StockDate =@StockDate Where StockID='" + txtStockID.Text + "'");
txtStockID.Text
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)