You could have 2 options :
- perform first a "select count * from (my query)" and then execute the query if count>0
- Use scrollable cursors, do OCI_FetchLast() and retrieve row count with OCI_GetRowCount()
But these 2 options are performance killers....
Thus, no way to find out....
Regards,
Vincent
Last edit: Vincent Rogier 2013-10-03
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Anonymous
-
2013-10-04
Many thanks for your rapid answer
Yours sincerely
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I tried OCI_FetchLast + OCI_GetRowCount() and don't Works, always return me 0. But if I use the combination OCI_FetchLast + OCI_GetRowCount(), yes, it returns correctly the number of rows, but ... I lose a row, that I may recover with OCI_FetchPrev ... too many instructions
Thank you
Josemi
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hello,
Is there any way to know if an "OCI_ExecuteStmt (..,..)" have got any data without or before use "OCI_FetchNext"?
Many thanks in advance
Josemi
Hi,
No, there is no way.
You could have 2 options :
- perform first a "select count * from (my query)" and then execute the query if count>0
- Use scrollable cursors, do OCI_FetchLast() and retrieve row count with OCI_GetRowCount()
But these 2 options are performance killers....
Thus, no way to find out....
Regards,
Vincent
Last edit: Vincent Rogier 2013-10-03
Many thanks for your rapid answer
Yours sincerely
Hello, again
I tried OCI_FetchLast + OCI_GetRowCount() and don't Works, always return me 0. But if I use the combination OCI_FetchLast + OCI_GetRowCount(), yes, it returns correctly the number of rows, but ... I lose a row, that I may recover with OCI_FetchPrev ... too many instructions
Thank you
Josemi