rmatosaw Report post Posted 08/11/2009 01:23 PM Ok, I will post if the problem occur again. ----------------------------------------------------------------------------------- I'm trying to use 'Query Database' Task in script, calling a stored procedure in SQL. The stored procedure check some tables etc, then returns a query with information necessary to the next step. The syntax is: EXEC dbo.proc_ura_teste @id = '$RV[AskCallerForID]'; But this query not runs well. Always returns the 'fail' result. I tested the connection string, permissions etc, and all is ok. What is wrong ? Thanks Share this post Link to post
rmatosaw Report post Posted 08/11/2009 02:25 PM Reading the vgEngine log, I verified that when I use stored procedure, the system treats it as a "NonQuery" syntax. I'm using. Is it ok ? --------------------------------------------------- 102047.405 6 1 1 db fctry RunQuery_AdoNetFactory QryNum, System.Data.SqlClient, Data Source=laboratorio\desenv;Database=acionamento_cobranca;User ID=acionamento_cobranca;Password=#####I REMOVED HERE#####, EXEC dbo.proc_ura_teste @id = '123456789'; 102047.405 6 1 1 db fctry new db thread started. 102047.405 12 1 1 db fctry connection create call. 102047.405 12 1 1 db fctry connection open call. 102047.405 12 1 1 db fctry connection open returned. =====> 102047.405 12 1 1 oVgmDbQuery_AdoNetCommon_Completed SqlQueryType=NONQUERY, RowsCount=-1 ---------------------------------------------------- Share this post Link to post
SupportTeam Report post Posted 08/11/2009 09:32 PM Stored procedures and their parameter assignments need to be done from VBScripts. There are some examples of how to call stored procedures in the Help file. See: http://www.voiceguide.com/vghelp/source/html/modvbs.htm Share this post Link to post
rmatosaw Report post Posted 08/12/2009 12:36 PM Ok, thank you. I made as examples to try to recover data from a select returned by the stored procedure without success. Change the stored procedure to return data via output parameters. It worked. Share this post Link to post
jewillis Report post Posted 10/01/2009 03:42 AM Rafael (or support) can you post an example. I can not get output paramaters to work Jeff Share this post Link to post
SupportTeam Report post Posted 10/01/2009 03:59 AM This is really more of a VBScript related question rather then a VoiceGuide related question. Probably best to search on Google using a term something like this: "VBScript stored procedures output parameters" This should bring up some relevant information. Share this post Link to post
jewillis Report post Posted 10/01/2009 01:11 PM i can do it in VB, no prob. I have been unable to use output paramaters when calling a stored procedure from the database query object as with the below example, even when the paramater in the sp is cast as 'output'. exec UpdateMDOHCallLog '$RV[uID]', '$RV[GetETA]', '$RV[ArrivalTimeIn24HourFormat]' Share this post Link to post