read contents of a sql table into a data grid view
        Posted  
        
            by syedsaleemss
        on Stack Overflow
        
        See other posts from Stack Overflow
        
            or by syedsaleemss
        
        
        
        Published on 2010-04-14T05:09:37Z
        Indexed on 
            2010/04/14
            5:13 UTC
        
        
        Read the original article
        Hit count: 231
        
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.
© Stack Overflow or respective owner