ok to use one global dataset?

  • Thread starter Thread starter Max
  • Start date Start date
M

Max

I use a lot of datagrids in my project, and each time I fill a datagrid I'm
creating a new dataset, adding a datatable (via remote SQL Server) and then
after the datagrid is done with it, I dispose of the dataset. I'm thinking
why not just maintain ONE global (public) dataset that contains all the
datatables my datagrids will use, and that lasts the life of the
application? The datagrids can just pull tables from this dataset, and I can
control independently whether or not the dataset needs updated by the SQL
Server. Wouldn't that actually be better performance?

-Max
 
DataSet's maintain a slight amount of overhead per DataTable, but that won't
sink you at all. The DataTable and the associated collections is where all
of your data is actually stored (DataColumn actually holds huge arrays of values
for that particular column). Using a single global data-set will probably be a
drastic
improvement in performance for you...
 
Back
Top