VoiceGuide IVR Software Main Page
Jump to content

Iterate Trough Records From Db

Recommended Posts

Hi,

 

How to read each record from database separately (Oracle)?

 

I.e. I get 10 records as a result of query, next I'd like to read (TTS) each record at one time (long sentences).

 

Now I read from database, the result is stored in $RV[q1] next I define a counter, which is updated after a loop. A huge scrips mostly with IF conditions tests counter and uses appropriate value (i.e. $RV[q1_1_1] and so on).

 

Such a method results in huge number of created files in data directory. Moreover it's not flexible because I've got a fixed number of IFs and id I would have more records than IF the script wouldn't work correctly.

 

Do you know a smarter solution?

 

Thanks and all the best

Dominik

Share this post


Link to post

You can check how many rows were retrieved by using the "_RowCount" Result Variable - and then you can just loop through to the value of that RV.

 

Each spoken TTS will create a temporary sound files in \data\ directory - these files do not just take up more and more disk space - they are overwritten by TTS on next call and also are deleted by a periodic cleaning process.

Share this post


Link to post

Thanks,

I know about _RowCount

but what about conditions? I don't know max row count and therefore I cannot determine max number of IFs.

 

 

Dominik

Share this post


Link to post

Can you code your IF statements to use a counter variable, and therefore have one loop which goes though all of the retrieved records? Please post the script showing what you are trying to do.

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×