Accesing Database in Windows Forms Application is Simple as Web
you can Access it by including
using System.Data.SqlClient;
in the header
and
Create an object of SqlConnection class by
SqlConnection con=new SqlConnection("connectionstring");
here connection string would be like
Data Source=SOFTWARE27\\SQLEXPRESS;Initial Catalog=AssetTrack;Integrated Security=True
you should change your server name ie DataSource ,itial ctalog ie database name;
then to do transactions you should maintain an Open Connection.
ie
con.Open();
the write the code in button click
such as to insert data
SqlCommand cmd;
cmd= new SqlCommand(query, con);
cmd.ExecuteNonQuery();
Think this Might Help You
Happy Programming;-)