Shared functions in DAL

Discussion in 'ASP .Net' started by milop, Mar 23, 2009.

  1. milop

    milop Guest

    Hello.

    I'm using a three tiered architecture (UI, BLL, DAL) in an ASP.Net
    application.

    The functions in the DAL are shared functions, while the BLL's are not.

    What are the ramifications, if any, of using Shared functions in the DAL?

    Is there an exposure of "data sharing" from the DAL to the BLL?

    Thanks in advance,

    Mike
    milop, Mar 23, 2009
    #1
    1. Advertising

  2. milop

    Mr. Arnold Guest

    "milop" <> wrote in message
    news:...
    > Hello.
    >
    > I'm using a three tiered architecture (UI, BLL, DAL) in an ASP.Net
    > application.
    >
    > The functions in the DAL are shared functions, while the BLL's are not.
    >
    > What are the ramifications, if any, of using Shared functions in the DAL?
    >
    > Is there an exposure of "data sharing" from the DAL to the BLL?
    >
    > Thanks in advance,
    >


    Can you give an example of this shared function you are talking about?
    Mr. Arnold, Mar 24, 2009
    #2
    1. Advertising

  3. milop

    sloan Guest

    I would LOOK AT the source code for the older DAAB block.


    http://www.microsoft.com/downloads/...0a-9877-4a7b-88ec-0426b48df275&displaylang=en


    IIRC, it used static (shared in vb.net) methods. But I'm going by memory.


    Note, EnterpriseLibrary.Data is the "successor" for the DAAB 2.0.


    Find the LoadDataSet method for example. What I'm getting at is that if
    that code is static, you're probably ok.

    HOWEVER, you should post some code...............





    "milop" <> wrote in message
    news:...
    > Hello.
    >
    > I'm using a three tiered architecture (UI, BLL, DAL) in an ASP.Net
    > application.
    >
    > The functions in the DAL are shared functions, while the BLL's are not.
    >
    > What are the ramifications, if any, of using Shared functions in the DAL?
    >
    > Is there an exposure of "data sharing" from the DAL to the BLL?
    >
    > Thanks in advance,
    >
    > Mike
    >
    sloan, Mar 24, 2009
    #3
  4. milop

    milop Guest

    Public Shared Function GetSomeData(ByVal InputField As Int32) As
    DataTable
    Try
    Using cn As New
    iDB2Connection(ConfigurationManager.ConnectionStrings("iSeries").ConnectionString)
    Using cm As New iDB2Command
    cm.CommandText = "GetSomeData"
    cm.CommandType = CommandType.StoredProcedure
    cn.Open()
    cm.Connection = cn
    cm.DeriveParameters()
    cm.Parameters("@InputField").Value = InputField
    Dim dt as New DataTable()
    Using da as New IDB2DataAdapter(cm)
    da.Fill(dt)
    End Using
    ThrowException(cm, Nothing) ' Custom method that
    examines returned error info.
    Return dt
    End Using
    End Using

    Catch Critical As CriticalException
    Throw

    Catch Severe As SevereException
    Throw

    Catch Warning As WarningException
    Throw

    Catch ex As Exception
    SupportEmail.SendEmail("Exception caught in blah, blah,
    blah", ex.ToString())
    Throw New CriticalException()

    End Try
    End Function

    "Mr. Arnold" <MR. > wrote in message
    news:...
    >
    > "milop" <> wrote in message
    > news:...
    >> Hello.
    >>
    >> I'm using a three tiered architecture (UI, BLL, DAL) in an ASP.Net
    >> application.
    >>
    >> The functions in the DAL are shared functions, while the BLL's are not.
    >>
    >> What are the ramifications, if any, of using Shared functions in the DAL?
    >>
    >> Is there an exposure of "data sharing" from the DAL to the BLL?
    >>
    >> Thanks in advance,
    >>

    >
    > Can you give an example of this shared function you are talking about?
    milop, Mar 24, 2009
    #4
  5. milop

    milop Guest

    You're right, and I have the Enterprise Library installed. I'll have a look.

    I posted some code in response to Mr. Arnold's response.

    Thanks, Sloan.

    "sloan" <> wrote in message
    news:eCo%...
    >I would LOOK AT the source code for the older DAAB block.
    >
    >
    > http://www.microsoft.com/downloads/...0a-9877-4a7b-88ec-0426b48df275&displaylang=en
    >
    >
    > IIRC, it used static (shared in vb.net) methods. But I'm going by memory.
    >
    >
    > Note, EnterpriseLibrary.Data is the "successor" for the DAAB 2.0.
    >
    >
    > Find the LoadDataSet method for example. What I'm getting at is that if
    > that code is static, you're probably ok.
    >
    > HOWEVER, you should post some code...............
    >
    >
    >
    >
    >
    > "milop" <> wrote in message
    > news:...
    >> Hello.
    >>
    >> I'm using a three tiered architecture (UI, BLL, DAL) in an ASP.Net
    >> application.
    >>
    >> The functions in the DAL are shared functions, while the BLL's are not.
    >>
    >> What are the ramifications, if any, of using Shared functions in the DAL?
    >>
    >> Is there an exposure of "data sharing" from the DAL to the BLL?
    >>
    >> Thanks in advance,
    >>
    >> Mike
    >>

    >
    >
    milop, Mar 24, 2009
    #5
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. DJ Dev
    Replies:
    3
    Views:
    16,094
    Gandalf
    Feb 8, 2004
  2. Joe Fallon
    Replies:
    3
    Views:
    752
    =?Utf-8?B?Z3V5?=
    Jul 16, 2004
  3. tshad
    Replies:
    11
    Views:
    805
    tshad
    May 27, 2005
  4. Imran Aziz
    Replies:
    1
    Views:
    528
    Stefan
    Aug 22, 2005
  5. Xiangliang Meng
    Replies:
    1
    Views:
    1,576
    Victor Bazarov
    Jun 21, 2004
Loading...

Share This Page