Solved

return dataset in presentation layer

Posted on 2008-06-16
1
300 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
Comment Utility
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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

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…
A long time ago (May 2011), I have written an article showing you how to create a DLL using Visual Studio 2005 to be hosted in SQL Server 2005. That was valid at that time and it is still valid if you are still using these versions. You can still re…
Internet Business Fax to Email Made Easy - With eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…
This video shows how to remove a single email address from the Outlook 2010 Auto Suggestion memory. NOTE: For Outlook 2016 and 2013 perform the exact same steps. Open a new email: Click the New email button in Outlook. Start typing the address: …

772 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

11 Experts available now in Live!

Get 1:1 Help Now