eddie Posted June 26, 2006 Share Posted June 26, 2006 hi all out there, im a singaporean student ..currently im doing a c# project.. i need to create a visual studio 2005 windows application that can add delete modify eg sort,filter a database in excel format.However i need to use SQL to link the database to my windows application and i have some problems with SQL. i have read the intro but anybody can tell me how n where to download the sql server and any online resources that can teach me how to link the database with my application .. thanks Link to comment Share on other sites More sharing options...
aspnetguy Posted June 26, 2006 Share Posted June 26, 2006 There is a link in my si to the free version of sql server 2005 and other dtaabses too.You will need to use the System.Data.SqlCient namespace (for SQL Server): SqlConnection cnt = new SqlConnection("Connection String");SqlCommand cmd = new SqlCommand("query",cnt);SqlDataReader data = cmd.ExecuteReader();while(data.Read()){ //do something somevariable = data["column Name"].ToString();}data.Close();cnt.Close(); Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now