Shared functions in DAL

M

milop

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
 
M

Mr. Arnold

milop said:
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?
 
M

milop

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
 
M

milop

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.
 

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

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,009
Latest member
GidgetGamb

Latest Threads

Top