TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
craig buckner
NA
1
1.4k
Need to get the Row Count after execute a Stored Prodcedure
Feb 14 2013 7:34 AM
I am trying to get the total amount of records that my stored procedure returns
using the SP
CREATE PROCEDURE [dbo].NewSelectCommand
(
@catID int
)
AS
SET NOCOUNT ON;
SELECT catID, title, size, type, printon, inkType, item, imageUrl, transferID FROM TransferDesigns WHERE (catID = @catID)
RETURN @@ROWCOUNT
Then on the aspx.cs file
KraftDataContext dataContext = new KraftDataContext();
var catNames = dataContext.
NewSelectCommand(catID);
DataList1.DataSource = catNames;
DataList1.DataBind();
Now when I debug the breakpoint before DataBind there is a ResultValue or ReturnValue with the correct amount under NewSelectCommandResults in it but I cant seem to get it there is ISingleResult Well anyway I need the total number of returned records so I can build the PageSize
Reply
Answers (
0
)
C# linq to sql
Response.BinaryWrite error by LINQ