Solved

return dataset in presentation layer

Posted on 2008-06-16
1
305 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 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

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Summary Displaying images in RichTextBox is a common requirement with limited solutions available. Pasting through clipboard or embedding into RTF content only support static images.  This article describes how to insert Windows control objects int…
Today I had a very interesting conundrum that had to get solved quickly. Needless to say, it wasn't resolved quickly because when we needed it we were very rushed, but as soon as the conference call was over and I took a step back I saw the correct …
Attackers love to prey on accounts that have privileges. Reducing privileged accounts and protecting privileged accounts therefore is paramount. Users, groups, and service accounts need to be protected to help protect the entire Active Directory …

733 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