G
Guest
Hi all,
I am worrying a bit about the disconnected model, using drag 'n drop
approach. Fine, it generates code for me, but it looks to be very expensive
regarding memory. I started and application and had a look at it. When the
Data Source is added, a DataSet class is created and associated classes as
well.
What I then discovered, is that for each Window Form created with the drag
and drop approach, the Data Set and other objects are instantiated. It means
that if, say, I have 5 windows opened (MDI application) the DataSet,
DataTables, etc. are instantiated 5 times, and the database data is cached 5
times ! If the database is large, that mean a lot of memory is used. What
bugs me, is that the datasets may not contain the same data.
I think datasets are fine. Is there some way to use this model, benefit from
generated code, but have a single DataSet shared among Forms ?
Thanks
I am worrying a bit about the disconnected model, using drag 'n drop
approach. Fine, it generates code for me, but it looks to be very expensive
regarding memory. I started and application and had a look at it. When the
Data Source is added, a DataSet class is created and associated classes as
well.
What I then discovered, is that for each Window Form created with the drag
and drop approach, the Data Set and other objects are instantiated. It means
that if, say, I have 5 windows opened (MDI application) the DataSet,
DataTables, etc. are instantiated 5 times, and the database data is cached 5
times ! If the database is large, that mean a lot of memory is used. What
bugs me, is that the datasets may not contain the same data.
I think datasets are fine. Is there some way to use this model, benefit from
generated code, but have a single DataSet shared among Forms ?
Thanks