We have CVP 10.5 and Studio 10.5. In my Studio App we use a standard Database element which provides CVP-MS SQL integration. In the application we need to see how many rows were found at SQL when we send a typical SELECT query. Then I intend to use this value at Decision element for some logic.
CVP 10.5 Documentation says that for this purpose we can use num_rows_processed Databese Element variable. However, when I try to create a statement at Decision Element, this num_rows_processed variable doesn't appear in the drop-down list. The drop-down list is empty. I tried to type the name of the variable manually, the Studio accepts it. But when we call to the application, we receive an error (Male voice). The log says that such variable doesn't exist.
At the same time on the neighbour CVP 11.0 this variable can be used without any problems. Does anyone know if num_rows_processed is the feature of version 11 only? If not, how can we use num_rows_processed in Studio 10.5?
Many thanks in advance for your answers
The variable num_rows_processed began in version 11.0
Prior to that, you'll have to either create a custom database element or
use another DB element just prior to yours where you execute a count
function (or similar) to determine the number of rows you are about to
modify: select count() as num_rows_processed from tablename where ....*
It will be returned as element data named num_rows_processed.
If it's a huge table, you may want to add some modifiers to that query
(like top 1000?).
Thanks for your explanations. I will try to implement it tomorrow. Just one question regarding support of this variable in Studio 11.0. I also thought that this variable began in version 11, but this document confuses me:
Element Specifications for Cisco Unified CVP VXML Server and Cisco Unified Call Studio Release 10.5(1) - Database [Cis
Why does Cisco say that it is supported in 10.5 as well??? Do I misunderstand smth?
I have just tried Janine's advise and added another DB elemet prior the main one. In the new DB element I configured Type = Single and SQL Query = select count(name of column) as num_rows_processed from TABLE_NAME where... After execution of this element I could use the num_rows_processed as Element data.
Janine, thanks a lot. I apreciate your assistance ever so much.
I just tested it and CVP10.5/Studio 10.5 Database element definitely
does NOT create the element data named num_rows_processed. That was
introduced in 11.0
Glad the workaround worked for you.
I also checked this in the lab, but just was confused with the docs from Cisco. If they didn't say anything about this variable in the docs for 10.5, for sure, it would be absolutely clear that this is the new feature of release 11.
But this is Cisco. There are so many surprizes and mysteries in Cisco world. I'm very happy that you could help clarifying one of them.
Please sign in to leave a comment.