?
Solved

return dataset in presentation layer

Posted on 2008-06-16
1
Medium Priority
?
307 Views
Last Modified: 2008-06-17
Hi
How can I access my getquery  function from businesslayer in my userinterface aspx.vb page so that it returns a dataset.


 Public Function getquery(ByVal parm1 As String, ByVal parm2 As String,
     Optional ByVal parm2 As Boolean = False) As DataSet

        Try
         
            getquerydata = iobj_DataAccessLayer.GetQueryDataSet(parm1, parm2 and so on )
        Finally
            If Not (iobj_DataAccessLayer) Is Nothing Then iobj_DataAccessLayer.Dispose()
        End Try
    End Function

getquery  is my function in business layer

GetQueryDataSet  is a method in dataaccess layer that returns dataset


0
Comment
Question by:PNKJ
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 4

Accepted Solution

by:
molku earned 2000 total points
ID: 21802220
Put a return statement in your Function. You can then call it from your code behind like:
Dataset ds = yourBusinessLayerObject.getquery("parm1", "parm2", false)
Public Function getquery(ByVal parm1 As String, ByVal parm2 As String,
     Optional ByVal parm2 As Boolean = False) As DataSet
 
  Try
    return iobj_DataAccessLayer.GetQueryDataSet(parm1, parm2 and so on )
  Finally
    If Not (iobj_DataAccessLayer) Is Nothing Then
       iobj_DataAccessLayer.Dispose()
  End Try
 
End Function

Open in new window

0

Featured Post

On Demand Webinar - Networking for the Cloud Era

This webinar discusses:
-Common barriers companies experience when moving to the cloud
-How SD-WAN changes the way we look at networks
-Best practices customers should employ moving forward with cloud migration
-What happens behind the scenes of SteelConnect’s one-click button

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Many of us here at EE write code. Many of us write exceptional code; just as many of us write exception-prone code. As we all should know, exceptions are a mechanism for handling errors which are typically out of our control. From database errors, t…
This article shows how to deploy dynamic backgrounds to computers depending on the aspect ratio of display
Michael from AdRem Software outlines event notifications and Automatic Corrective Actions in network monitoring. Automatic Corrective Actions are scripts, which can automatically run upon discovery of a certain undesirable condition in your network.…
If you’ve ever visited a web page and noticed a cool font that you really liked the look of, but couldn’t figure out which font it was so that you could use it for your own work, then this video is for you! In this Micro Tutorial, you'll learn yo…
Suggested Courses

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question