VoiceGuide IVR Software Main Page
Jump to content

Odbc Bind Variables

Recommended Posts

Hi Support Team:

 

In my App I connect to an Oracle DB using ODBC. Everything works fine but I wonder how can I use bind variables in the Database Query Module to optimize my connection with Oracle?

 

Here is an example of a query:

 

SELECT IVR_VERIFICA_PRESTAMO($RV[solicitar_Numero_Emp]),IVR_FECHA_RENOVACION($RV[solicitar_Numero_Emp]),IVR_NUMPAGOS($RV[solicitar_Numero_Emp]),IVR_SOBRANTE_MAXIMO($RV[solicitar_Numero_Emp]),IVR_BALANCE_CANCELACION($RV[solicitar_Numero_Emp]),IVR_ESTATUS_SOLICITUD($RV[solicitar_Numero_Emp]),IVR_BUSCA_SS($RV[solicitar_Numero_Emp]),IVR_CALCULA_PAGO($RV[solicitar_Numero_Emp]),IVR_HISTORIAL_PRESTAMOS($RV[solicitar_Numero_Emp]),IVR_FECHA_ULTIMO_PRESTAMO($RV[solicitar_Numero_Emp]),CHECK_IND FROM SYS.DUAL;

 

Thanks in advance...

Share this post


Link to post

You want to store retrieved information in $RVs? Or do you want to use $RVs in the SQL query issued to the database?

 

Retrieved data is automatically stored in $RVs. Please see: http://www.voiceguide.com/vghelp/source/html/moddbquery.htm

 

And Any $RVs sapecified as part of the SQL query will be replaced with their values before SQL query is ran.

 

If the above does not answer question then please clarify your requirements and post traces and/or script (.ZIPed).

Share this post


Link to post

The above query works fine, it is not about sending the values of the variables. My question is a little more technical. This query as it is sends a hard-coded statement to the Oracle Database. What I need is to configure bind variables to be sent to Oracle thru ODBC. As it is right now, every time I run this query I get a different sql statement in Oracle. If I could configure bind variables, there would be only 1 sql statement in Oracle, even though there are different values in the variables.

 

Is there any other way to access the database in VG, like using a script where I can capture the result of the query like in the Query Database Module?

Share this post


Link to post

Do you mean something like a Stored Procedure?

 

The calling of stored procedures can be done from within a VBScript module. There is an example in the VBScript Module Help page which shows how to do this from within VBScript. Please see: http://www.voiceguide.com/vghelp/source/html/modvbs.htm (near the end of the page).

 

If you can't use VBScript then please let us know and we can create a module for you which can perform what you need directly through VoiceGuide's database query engine (which uses ADO.NET). This would be custom modification.

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
×