multiple-resultsets

Linq to SQL Stored Procedures with Multiple Results

We have followed the approach below to get the data from multiple results using LINQ To SQL CREATE PROCEDURE dbo.GetPostByID ( @PostID int ) AS SELECT * FROM Posts AS p WHERE p.PostID = @PostID SELECT c.* FROM Categories AS c JOIN PostCategories AS pc ON (pc.CategoryID = c...

Stored Procedure Returns Multiple Recordsets

I am pretty new to c#. I have a page that requires multiple recordsets, and a single sproc that returns them. I am using a repeater control for the main recordset. How do I get to the next returned recordset? OK so the datasource is in the aspx page. I would have move it to the code behind page to use NextResult right? Here is my c...

LINQ to SQL stored procedures with multiple results in Visual Studio 2008

I'm using visual studio 2008 and I've created a stored procedure that selects back two different result sets. I drag the stored proc on to a linq to sql dbml datacontext class, causing visual studio to create the following code in the cs file: [Function(Name="dbo.List_MultiSelect")] public ISingleResult<DataAccessLayer.DataEntities.Lis...

Preferred way of retrieving row with multiple relating rows

I'm currently hand-writing a DAL in C# with SqlDataReader and stored procedures. Performance is important, but it still should be maintainable... Let's say there's a table recipes (recipeID, author, timeNeeded, yummyFactor, ...) and a table ingredients (recipeID, name, amount, yummyContributionFactor, ...) Now I'd like to query like...

sql stored procedure clear resultsets

Can I clear the multiple result sets that a stored procedure has already gathered so that the next result set that is created becomes the very first result set returned by the procedure? ...

Hiding result sets from multiple selects in a stored procedure

I have a stored procedure that retrieves SQL queries as text and executes the statements using sp_executesql. Each of the dynamic queries is a count query in that it only returns the number of records found (select COUNT(id) from...). I am looping through a set of SQL queries stored as text and building a table variable out of the result...

Avoid MySQL multi-results from SP with Execute

Hi, i have an SP like BEGIN DECLARE ... CREATE TEMPORARY TABLE tmptbl_found (...); PREPARE find FROM" INSERT INTO tmptbl_found (SELECT userid FROM ( SELECT userid FROM Soul WHERE .?.?. ORDER BY .?.?. ) AS left_tbl LEFT JOIN Con...

PHP return self as array of objects from within the class?

I'm using CodeIgniter to build a php web application, and I'm trying to use good OO practices - of which there appears to be many schools of thought. I specifically have a class biography_model to interact with a MySQL table. This data model has some class properties representing the columns in the table, but it also has some properties ...