المساعد الشخصي الرقمي

مشاهدة النسخة كاملة : cannot insert into database 2005 using visual c# 2008



C# Programming
06-12-2009, 01:51 AM
Thank you for the link. I'm now stock here please I need help on this.

SqlCommand myCommand= new SqlCommand("INSERT INTO table (Column1, Column2) " +
"Values ('string', 1)", myConnection);

The values is given me problem. How do I get the value from textbox before it can be inserted into batabase. I have design my form and i need to get information from user through the textbox whenever they click the save button on the form.
Thanks for your help.
Ademola