Wednesday, August 20, 2008

How to run sql query in asp.net ?

private SqlConnection sqlConn=new SqlConnection("ConnectionString");
sqlConn.Open();
SqlCommand sqlCmd = new SqlCommand("Query", sqlConn);
SqlCommand.ExecuteNonQuery()

sqlCmd.Dispose();
sqlConn.Close();

No comments: