Strategy for usage of OleDBConnection, adapter, dataset.

  • Thread starter Thread starter Tim Conner
  • Start date Start date
T

Tim Conner

Hi,

In a typical database application, let's say an accounting system.
Which would be the strategy for the OleDBConnection object usage, one per form
or per application ?

Also, is it a good thing to put a single dataset with all the tables needed in
the application in one place and make all the forms use just that single
dataset? or it is better to drop one per form ?


Thanks in advance,
 
Hi Tim,

Tim Conner said:
Hi,

In a typical database application, let's say an accounting system.
Which would be the strategy for the OleDBConnection object usage, one per form
or per application ?

You might create the connection when needed (store only connection string).
There is no performance drawback beacuse of pooling.
Also make sure that connection is opened as minimal time as possible.
Also, is it a good thing to put a single dataset with all the tables needed in
the application in one place and make all the forms use just that single
dataset? or it is better to drop one per form ?

I prefer putting tables related to a business operation together.
Of course, it depends on you.
 
Back
Top