retiro Report post Posted 07/13/2010 07:58 PM 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
SupportTeam Report post Posted 07/13/2010 08:26 PM 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
retiro Report post Posted 07/13/2010 09:10 PM 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
SupportTeam Report post Posted 07/14/2010 02:46 AM 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