Solved

return dataset in presentation layer

Posted on 2008-06-16
1
301 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
1 Comment
 
LVL 4

Accepted Solution

by:
molku earned 500 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

A basic question.. “What is the Garbage Collector?” The usual answer given back: “Garbage collector is a background thread run by the CLR for freeing up the memory space used by the objects which are no longer used by the program.” I wondered …
For those of you who don't follow the news, or just happen to live under rocks, Microsoft Research released a beta SDK (http://www.microsoft.com/en-us/download/details.aspx?id=27876) for the Xbox 360 Kinect. If you don't know what a Kinect is (http:…
Here's a very brief overview of the methods PRTG Network Monitor (https://www.paessler.com/prtg) offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…
You have products, that come in variants and want to set different prices for them? Watch this micro tutorial that describes how to configure prices for Magento super attributes. Assigning simple products to configurable: We assigned simple products…

932 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

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now