By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,987 Members | 1,552 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,987 IT Pros & Developers. It's quick & easy.

Get record count from Oracle Stored Procedure with out using Count built in function

P: 23
i have a stored procedure in oracle 9i as given below.It return the cursor to vb6 recordset .But i dont get the Recordcount in vb6 when i excute.

Oracle 9i code
procedure usp_Proc1(p_cursor OUT REFCURSOR_PKG.Get_REF_CURSOR)
is begin
open p_cursor FOR
select *
from tablename;

end usp_Proc1;


can any one tell how to get record count .I dont want to use Count built in function
Apr 20 '07 #1
Share this Question
Share on Google+
2 Replies


Expert 5K+
P: 8,434
I'm not familiar with this particular situation (never used Oracle) but I do know that sometimes in VB, to get a recordcount you need to use MoveLast. (Then MoveFirst again, of course, to start processing the records).

Perhaps this is one of those times.
Apr 22 '07 #2

P: 1
procedure usp_Proc1(p_cursor OUT REFCURSOR_PKG.Get_REF_CURSOR)
v_COUNT NUMBER;
is begin
open p_cursor FOR
select Count(*) into v_COUNT
from tablename;

end usp_Proc1;
Sep 22 '10 #3

Post your reply

Sign in to post your reply or Sign up for a free account.