Hi ,
I am newbie in C#. I created a database by right clicking on the project in solution explorer and by selecting add new item then selecting database. Database name is SAMP and it has a table called Account. can somebody tell me how to connect to this database and display the contents of Account table in a gridview control through coding. Not in Design. I am trying this for a long time but could not. Pls Help me. I am using VS2008 and SqlExpress 2005.
Indianblues
0
Newbie Poster
Recommended Answers
Jump to PostYou first have to connect to your database, use something like :
SqlConnection con = new SqlConnection("<connectionstring>");
All 4 Replies
ddanbe
2,724
Professional Procrastinator
Featured Poster
Indianblues
0
Newbie Poster
Indianblues
0
Newbie Poster
ddanbe
2,724
Professional Procrastinator
Featured Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.