ok to use one global dataset?

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
 
J

Justin Rogers

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...
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top