TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Israel
631
1.3k
217.4k
Why its updating only on one column. Not other one?
May 6 2014 7:32 AM
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();
}
}
Reply
Answers (
5
)
How to display dynamic data from db without using data ctrls
modem dial up connection using in .net 2010 0r 2012