Component class based DAL

J

John

Hi

I am into implementing my DALs using component based classes due to the drag
drop capability. However, can I do the following with component based DALs;

1. Share a common dataconnection between datadapters in different component
DALs? I have separate DALs for suppliers & clients but I want to share the
same db connection? Or, should I make a single DAL for both clients &
suppliers?

2. Filter a dataadpter result on any given value? For example can I filter
client's by current or prospects? Users would like to switch between the two
from time to time.

3. Sort a dataadapter result in any given order say by company id or company
name?

Thanks

Regards
 
K

Kathleen Dollard

John,

1. What's driving your desire to use a single connection? Transactions?
Don't worry about reusing the connection as a resource saving measure as
that is the job of connection pooling, as long as you insure you are using
exactly the same string.

For transactions, you have to determine who will orchestrate the trasaction.
That can be a separte transaction processing thingee, the UI, or the parent
object. IMO, the orchestrater should manage the transaction start to finish.

2 and 3. "the results of a DataAdapter" is a DataTable which you can sort
and filter via a view.
 

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