﻿<?xml version="1.0" encoding="UTF-8"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/"><channel><title>StrataFrame Forum » StrataFrame Application Framework - V1 » Business Objects and Data Access (How do I?)  » ROWCOUNT Parameter with Oracle SPs</title><generator>InstantForum 2017-1 Final</generator><description>StrataFrame Forum</description><link>http://forum.strataframe.net/</link><webMaster>StrataFrame Forum</webMaster><lastBuildDate>Fri, 24 Apr 2026 19:09:39 GMT</lastBuildDate><ttl>20</ttl><item><title>ROWCOUNT Parameter with Oracle SPs</title><link>http://forum.strataframe.net/FindPost11013.aspx</link><description>Hi there,&lt;/P&gt;&lt;P&gt;I am using Oracle SPs to handle my Inserts, Updates, etc.&amp;nbsp; I noticed that I had to have an out parameter named ROWCOUNT in order for my SPs to work.&lt;/P&gt;&lt;P&gt;Does SF use the ROWCOUNT parameter?&amp;nbsp; Is there a way I can access via my BOs?&lt;/P&gt;&lt;P&gt;Cheers,&lt;/P&gt;&lt;P&gt;Keith</description><pubDate>Wed, 22 Aug 2007 16:58:36 GMT</pubDate><dc:creator>Keith Harvey</dc:creator></item><item><title>RE: ROWCOUNT Parameter with Oracle SPs</title><link>http://forum.strataframe.net/FindPost11014.aspx</link><description>The ROWCOUNT is needed to determine how many rows were modified by the last action.&amp;nbsp; So, it's either going to contain 1 or 0 so that the BO can check for concurrency issues.&amp;nbsp; 1 means the record was successfully updated, 0 means the record was not updated because it's been deleted, or the concurrency checks failed.&amp;nbsp; We had to include a ROWCOUNT because silly Oracle does not automatically return the RecordsAffected through the ExecuteNonQuery() on the OracleCommand objects for stored procedures.&amp;nbsp; So, in order to determine whether the record was updated, we had to include the ROWCOUNT parameter that should return the number of records affected by the command.&lt;/P&gt;&lt;P&gt;Looking at my Oracle unit tests, we use this to stuff the row count into the parameter:&lt;/P&gt;&lt;P&gt;"P_ROWCOUNT" := SQL%ROWCOUNT;&lt;/P&gt;&lt;P&gt;As for only returning a set number of rows... you can certainly use the WHERE ROWCOUNT &amp;lt; X as the equivalent of SQL TOP X.&amp;nbsp; We do this in places where we need to generate a SELECT TOP dynamically.&amp;nbsp; But if you want the raw rowcount of the table, you'll just have to use SELECT COUNT(*).</description><pubDate>Wed, 22 Aug 2007 16:58:36 GMT</pubDate><dc:creator>StrataFrame Team</dc:creator></item></channel></rss>