Basic Connectivity C# with Sql Server
private static void CreateConnection(string queryString,string connectionString) { using (SqlConnection connection = new SqlConnection( connectionString)) { SqlCommand command = new SqlCommand(queryString, connection); command.Connection.Open(); command.ExecuteNonQuery(); } }
sample connection string for C#
"Persist Security Info=False;Integrated Security=true;Initial Catalog=Northwind;
server=(local)"
No comments:
Post a Comment
Comments Welcome