Tech
Forums
Jobs
Books
Events
Interviews
Live
More
Learn
Training
Career
Members
Videos
News
Blogs
Login
Sign Up
Ask Question
5
Reply
Why its updating only on one column. Not other one?
Israel
May 6 2014 7:32 AM
721
Reply
Hi!
I have three records: "
search
","
product
" and "
stock
".
When I make a search its show me the records searched on my textboxs ("
produtoStocks.Text
" and "
nStocksStocks.Text
"). Then when I am updating it's update only on column"
product
". Not on "
stocks
". why???
Please could you help pn it:
private void button1_Click(object sender, EventArgs e)
{
{
conn = new SqlConnection(connstr);
conn.Open();
comm = new SqlCommand("update searching set product= '" + produtoStocks.Text + ", stocks=' " + nStocksStocks.Text + "' where code = " + codigoBarraStocks.Text + " ", conn);
// Its happen here
try
{
comm.ExecuteNonQuery();
MessageBox.Show("Dado atualizado com exito!");
}
catch (Exception)
{
MessageBox.Show("Dado não atualizado!");
}
finally
{
conn.Close();
}
}
Upload Source Code
Select only zip and rar file.
Post
Reset
Cancel
Answers (
5
)
Next Recommended Forum
insert data to DB with MS SQL using Classic ASP
How can I say "Code not found"?