VoiceGuide IVR Software Main Page
Jump to content

Database Query

Recommended Posts

I am trying to fetch multiple rows from database and play the record sequentially, However row count is correct, but i am havin problem with concatinating the row conuter. I ve taken counter that is working properly but when i specify

$RV[ModName_4_$RV[counter]] its returning ] to play. however i tried $RV[ModName_4_1] its working fine and even $RV[counter] is giving proper output but concatination is giving a problem.

 

Please hlp.....

 

Thnx in advance

 

 

Pradeep

Share this post


Link to post

Are you using the latest version of VG? (v5.1.6)

 

This sounds like a bug which was present for a while in a release some time ago now... please update to latest version of VG and try again.

Share this post


Link to post

I am using VG 5.0.2. Do i really had to download the latest i.e 5.1.6??

 

and one more thing can i call stored procedure of SQL Server and i yes wht is procedure for that???

 

Actually we are testing 2-3 software and we have to finalise as per our requirement....

 

So, if u please help me out in this problem we will be really thankful to you. Looking forward to for reply...

 

Pradeep

Share this post


Link to post

v5.0.2 had the bug you are describing. Please uninstall it, then download and install v5.1.6

 

(where did you get v5.0.2 from? It should not have been available for download for some time now...)

 

From DB Query module you can only issue SQL type statements.

 

You should be able to have much better access to SQL Server's other functions through a "Run VB Script" module - that module will allow you to call COM functions in SQL Server... - and Stored Procedures should be accessible through those..

 

or : you can just use ADO in the Run VB Script module, eg:

 

' Note: include ADO constants

'Declare Vars
dim cmdCommand, prmParameter, rsRecordset, cnConnection, nParam1, sParam2

'Open Your Connection
set cnConnection= CreateObject("ADODB.Connection")
cnConnection.ConnectionString = "Provider=SQLOLEDB; Data Source=SERVER;" _
   & " Initial Catalog=DATABASE; User ID=USER;" _
   & " Password=PASSWORD"
cnConnection.open 

'Initialize Input Parameters
nParam1 = 999
sParam2 = "My Param"

set cmdCommand= server.createobject("adodb.command")
set prmParameter= server.createobject("adodb.parameter")
set rsRecordset= server.createobject("adodb.recordset")

With cmdCommand
'Prepare Command
set .ActiveConnection = cnConnection
.CommandType = adCmdStoredProc
.CommandText = "usp_MyStoredProc"

'Parameter 1
set prmParameter= .CreateParameter("@SPParameter1", adInteger, _
 adParamInput, ,nParam1)
.Parameters.Append prmParameter

'Parameter 2
set prmPartyView = .CreateParameter("@SPParameter2", adVarChar, _
 adParamInput,2000,sParam2 )
.Parameters.Append prmParameter

'Execute Stored Procedure and return Recordset if needed.

set rsRecordset= cmdCommand.execute
End With

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
×