views:

30

answers:

1

Im using c# .net windows application form. i have created a database named "resources" in SQL server 2005. In that i have a table named "resourcetable" which has two columns. now i need to read the data in the table into a datagridview. I can do this by using the connection string and querry by giving the table name.

But my problem is i have a button and if i click on that button, an open dialog box should open and i should be able to select a database amomng many databases and in that selected database i have to select one table amomg many tables. i.e select a table ofa particular database. and the contents of that table are to be displayed in a datagridview.

A: 

You need to learn ADO.NET - either Google or Bing for "ADO.NET beginner tutorial", or check out a few of those hits:

Or if you have a specific problem, change your question to be clearer as to what it is you're having trouble with.

marc_s