0

sqlconnection = new SqlCeConnection(ConnectionString);
sqlcommand = new SqlCeCommand();
sqlconnection.Open();
sqlcommand.Connection = sqlconnection;
sqlcommand.CommandText = (@"UPDATE ItemStock_Info SET Quantity =@qun WHERE [Item_Number]='"+ textBox1.Text +"'");
sqlcommand.Parameters.Add("@qun", qun);

3
Contributors
4
Replies
18
Views
8 Months
Discussion Span
Last Post by Shark_1
0

You're getting better. But when I work SQL problems like this I take the command and try it from my SQL command line. That way I can see if the syntax is right.

0

Yes, M. Before you write an app to interact with a SQL server you would have learned to use a SQL command line to practice with.

Maybe you skipped an important tutorial or lesson?

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.