You can make Stored procedures and *exec StoredProcedure Para1, Para2* in
your BLL.

DAL is *fixed* and there is no need to change the coding. DAL is a general
purpose COM/DCOM component and serve all the purposes of data access. If you
still want to make it general, pass the connection strings and sql query to
GetRecordset or ReadRecordset functions and these will fetch you the
recordset from any database as indicated by your connection string.

If you dont want the connection to be make and break for each call, cache
the connection object in DAL. DAL is a stateless component and will function
as a server. Set its property to global, multiuse. Once coded, DAL is a
fixed entity.

hope this helps.

M Tanveer


----- Original Message -----
From: "Andreas Håkansson" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, May 28, 2002 6:23 PM
Subject: {Mon-Incoming} Re: [DOTNET] Data Access Layer


> Wouldt this mean that I would have to do the calls
> to GetRecordset from the BLL and put sql queryes or
> sql sp calls in the BLL (parameter for the method).
>
> Doesnt sound like the right thing to do, since a change
> in the DAL would require possible rewrites of calls
> to GetRecordset/ReadRecordset
>
> --
> Andreas Håkansson
>
> On Tue, 28 May 2002 11:21:47 +0530, Tanveer <[EMAIL PROTECTED]>
wrote:
>
> >The better architecture would be:
> >
> >DAL: Data Access Layer
> >GetRecordset ( recordsource *sql string* or *exec storedprocedure*)
> >Static, clientside, batchoptimistic, for insert, update,delete
> >
> >ReadRecordset( recordsource *sql string* or *exec storedprocedure*)
> >static, clientside, readonly, for read only access, firehose recordset
> >---------------------------------------------
> >BLL: Business Logic Layer
> >GetCustomer
> >Getcustomer(ID)
> >GetAccount
> >---------------------------------------------
> >happy programming
> >
> >M Tanveer
> >
> >
> >----- Original Message -----
> >From: "Andreas Håkansson" <[EMAIL PROTECTED]>
> >To: <[EMAIL PROTECTED]>
> >Sent: Tuesday, May 28, 2002 1:43 AM
> >Subject: [DOTNET] Data Access Layer
> >
> >
> >> I'm making a very small 3-tier application to try
> >> out some concepts. Imagine I have the following
> >> design
> >>
> >> (1)BUSINESS LAYER
> >> Customer
> >> Account
> >>
> >> (2)DATA ACCESS LAYER
> >> CustomerDB
> >>
> >>
> >> Now the Customer class maintince a list of account
> >> objects internaly, which you can access through the
> >> Customer object using various methods.
> >>
> >> Would the CustomerDB include methods such as
> >> GetCustomer, GetCustomer(int id), GetAccounts(int customerID)
> >> etc ?
> >>
> >> Thus ecapsulating everything needed to create a fully
> >> functional customer object in the business layer..
> >>
> >> --
> >> Andreas Håkansson
> >> Student of Software Engineering
> >> andreas (at) selfinflicted.org
> >>
> >> In a world in which we are all slaves to the laws of gravity,
> >> I'm proud to be counted as one of the freedom fighters.
> >>
> >> You can read messages from the DOTNET archive, unsubscribe from DOTNET,
> or
> >> subscribe to other DevelopMentor lists at http://discuss.develop.com.
> >>
> >
> >You can read messages from the DOTNET archive, unsubscribe from DOTNET,
or
> >subscribe to other DevelopMentor lists at http://discuss.develop.com.
>
> This woule
>
> You can read messages from the DOTNET archive, unsubscribe from DOTNET, or
> subscribe to other DevelopMentor lists at http://discuss.develop.com.
>

You can read messages from the DOTNET archive, unsubscribe from DOTNET, or
subscribe to other DevelopMentor lists at http://discuss.develop.com.

Reply via email to