VoiceGuide IVR Software Main Page
Jump to content

Stored procedure in SQL

Recommended Posts

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

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

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

Rafael (or support) can you post an example. I can not get output paramaters to work

 

Jeff

Share this post


Link to post

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

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

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
×