Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
PeterG
Posting Yak Master
156 Posts |
Posted - 2002-04-08 : 12:13:47
|
| I have these 2 table structures:ProjectFolders- FolderID- FolderNameProjectFiles- FolderID- DocNameI have this stored procedure:"CREATE PROCEDURE SelectTreeMenu ASDeclare @foldercount intSelect a.FolderName, b.DocName from ProjectFolders ainner join ProjectFiles b on a.FolderID = b.FolderIDSelect @foldercount = count(*) from ProjectFolderswhere folderid <> 1return @foldercount"With my stored procedure, I want to return the folder and file names as a recordset and grab the folder count using comm.parameter(0).value in my asp page. When I run my asp page, I only get the recordset but not the folder count. I'm thinking that perhaps I don't get a folder count because I don't pass any parameter to the stored procedure. How can I get what I want? Pls help. Thanks. |
|
|
robvolk
Most Valuable Yak
15732 Posts |
Posted - 2002-04-08 : 12:20:33
|
| Take a look at this article:http://www.sqlteam.com/item.asp?ItemID=2644It has a really good overview on return values, OUTPUT parameters, and recordsets. It shows a way for you to call your procedure and have it get the value you want. |
 |
|
|
|
|
|