Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Return multiple tables to AJAX call
Message
From
06/08/2014 11:39:03
 
 
To
All
General information
Forum:
ASP.NET
Category:
AJAX
Title:
Return multiple tables to AJAX call
Environment versions
Environment:
VB 9.0
OS:
Windows Server 2012
Network:
Windows 2008 Server
Database:
MS SQL Server
Application:
Web
Miscellaneous
Thread ID:
01605232
Message ID:
01605232
Views:
45
Hi all

I need to return two data tables from a stored proc via an AJAX call, but it's giving me an "Internal Server Error" on the return to the AJAX call

AJAX Call:
    function grid_update()
    {
        $.ajax({
            type: 'POST',
            dataType: 'json',
            contentType: 'application/json',
            url: 'HeartBeat.aspx/UpdateGridData'
        })
        .done(function (response) {
            SetGrids(response.d);
        })
        .fail(function(){
        alert("Grid Update Error: " + arguments[2]);
                });
      }
The WebMethod being called:
       [WebMethod]
        public static DataSet UpdateGridData()
        {
            cSettings cSet = GetSettings();
            //ExecuteDataset(string commandText, string ConnectionName)
            DataSet ds1 = new DataSet();
            string SPCommand = "exec HFCJobLog.dbo.GetHBData 'all', ' " + cSet.TimeStart.ToString() + "', " + cSet.TimeSlice.ToString();
            ds1 = BLL.cJobs.GetHBData(SPCommand);
            return ds1;
        }
Could someone please 'splain to me (in words of one syllable preferably) how I need to go about this?

thanks
"You don't manage people. You manage things - people you lead" Adm. Grace Hopper
Pflugerville, between a Rock and a Weird Place
Next
Reply
Map
View

Click here to load this message in the networking platform