I have a project that connects to a production database and captures tables and views. The code I inherited connects to the SQL Server database through SqlConnection, while the user provides the credentials and location of the database that they provide. When data is needed, it uses the join and SQL string to create the SqlDataAdapter and populates a new DataSet. This data is then displayed after manipulating it, replacing the column names of the tables with the corresponding display names, something like this.
The problem is that the whole process is slow and the icing on the cake is that it displays large amounts of data in ListViews, which do not require the kindness to provide ten thousand rows of data. For design reasons, we are not going to break pages - there is a search control - and I can implement a virtual ListView with great effort, just to go back to where I was. I just think this is the wrong application for ListViews - I am connecting to the database and I am displaying entries. Sounds like work for a DataGridView.
Unfortunately, this just won't work. I am trying to bind a DataGridView to a DataSet that I got from the connection code via a DataBinder, but when I run it to see the data sitting in the DataSet, while the DataGridView is completely empty.
However, if I use the GUI binding in my test database, taking the current database schema and my credentials, that’s all that works. But I can’t use this material because it’s just not flexible enough - I don’t want to define a scheme in the code that I have to change every time we update the database, and I need access to the connection string, and I don’t seem to understand of this from the created TableAdapter.
Did I miss something simple here to make my DataSet / BindingSource solution? Am I barking the wrong tree?
? , , , 90% , , , , , , , , . , - , , , .