Link to home
Start Free TrialLog in
Avatar of triplebd69
triplebd69

asked on

Returning a dataset

I have an app that calls a web service and passes it a variable "uName"
It first hits my servie level like below.
Then to the businees layer and then the data layer.  The data layer calls a stored procedure and returns the data everything works.
When the Return dataset goes back to the business layer the ds is empty.
<WebMethod()> _
    Public Function GetCustInfo(ByVal uName As String) As DataSet
        Return objBusiness.GetCustInfo(uName)
    End Function
 
--------------------------------------------------
Data Layer
Public Function GetCustInfo(ByVal uName As String) As DataSet
        Dim db As dbAccess = New dbAccess
        Dim param As SqlParameter
        Dim parameters As ArrayList = New ArrayList
        Dim ds As DataSet
 
        param = New SqlParameter("@uName", uName)
        parameters.Add(param)
 
        ds = db.RunSPSQLServer("spGetCustInfo", parameters)
        ds.Tables(0).TableName = "CustInfo"
 
        Return ds
 
    End Function

Open in new window

ASKER CERTIFIED SOLUTION
Avatar of Fernando Soto
Fernando Soto
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of triplebd69
triplebd69

ASKER

In the service layer I needed to change the code to like below.

Dim ds As DataSet = objDataObject.GetCustInfo(uName)
Return ds
Glad to see that you have resolved your issue. Have a great day.  ;=)