Wed May 27, 2009 9:39 am
Hello, Please am new on C# and am using Ms Visuall studio 2008 to build a windows form using C# but I dont know how to connect my submit button to the database ms sql server 2005, so i can view the information entered from the form. Thank you
Sun Oct 24, 2010 4:38 am
using System.Data.SqlClient;
String sqlQuery = "INSERT INTO table name Values (@,@,@,@,@,@)";
SqlConnection aConn = new SqlConnection("Data source= Your Computer name \\SQLEXPRESS; database= your database name ; Integrated Security = true");
SqlCommand aCommand = new SqlCommand(sqlQuery, aConn);
Regards
Joe
Codemiles.com is a participant in the Amazon Services LLC Associates Program, an affiliate advertising program designed to provide a means for sites to earn advertising fees by advertising and linking to Amazon.com
Powered by phpBB © phpBB Group.