Tech
Forums
Jobs
Books
Events
Videos
Conference
Annual Conference
Bcrypt
Ai Conference
Live
More
Interviews
Certification
Training
Career
Members
News
Blogs
Contribute
An Article
A Blog
A Video
An Ebook
An Interview Question
Register
Login
0
Answer
Need to get the Row Count after execute a Stored Prodcedure
Ask a question
Ask a question
Upload Source Code:
Select only zip and rar file.
craig buckner
11y
1.2k
1
Reply
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
Post
Reset
Cancel
Answers (
0
)
Next Recommended Forum
C# linq to sql
Response.BinaryWrite error by LINQ