> Hi, > Is there a way to find out how many recordsets return by a > stored procedure? Or is there a way to merge all the > recordsets in a stored procedure so that it would only > return 1 recordset?
> I have a stored procedure that would return an unknown > number of recordsets depending on how many records we have > in the database, but each recordset will have the same > number of columns and column names. I need to know the > number of recorsets it will return so I can do a loop for > the cfprocresult. > Johnny JDBC may privde some reporting of this information... I don't remember off the top of my head, but the onTap framework has a tag designed to execute stored procedures with named parameters (uses a structure, i.e. the form scope for instance). I know it's designed to allow multiple result sets, although unfortunately I don't remember offhand if the automation is driven by the code or by meta-data returned from the database. If you're interested in going that route, check out my JDBC article in the ColdFusion Developer's Journal. http://www.sys-con.com/story/?storyid=45569&de=1 Otherwise, if you have control over the stored procedure, I'd recommend rewriting it so that all of the recordsets are returned (regardless of conditions) with any unneeded recordsets simply being empty (a select statement which returns records where the table's primary key is null is an easy way to achieve this). If you need to distinguish these results from results which would otherwise return an empty recordset, you can return an output parameter from the procedure with an integer indicating the number of relevant recordsets. hth s. isaac dealey 954.522.6080 new epoch : isn't it time for a change? add features without fixtures with the onTap open source framework http://macromedia.breezecentral.com/p49777853/ http://www.sys-con.com/author/?id=4806 http://www.fusiontap.com ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Logware (www.logware.us): a new and convenient web-based time tracking application. Start tracking and documenting hours spent on a project or with a client with Logware today. Try it for free with a 15 day trial account. http://www.houseoffusion.com/banners/view.cfm?bannerid=67 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:201362 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4 Donations & Support: http://www.houseoffusion.com/tiny.cfm/54