VoiceGuide IVR Software Main Page
Jump to content

Bd Query Module

Recommended Posts

Hi

 

I'm using a DB query module to retrieve values from mysql database.

When passing a basic "select * from members", the module works fine .But when passing the following sql query:

 

"select members.clientid,count(*) as nbr from result left join members on members.clientid=result.clientid where (connexion=1) group by members.clientid order by nbr asc;"

 

The DB query module does not work and I have the follwing error logged:

 

112753.781 23 1 ERROR v7.0.3415.28902 (2009-05-08 15:03:23.86) ConnectAndRun_AdoNetFactory : Le cast spécifié n'est pas valide.

112753.781 23 1 oVgmDbQuery_AdoNetCommon_Completed SqlQueryType=ERROR, RowsCount=0

112753.781 23 1 oVgmDbQuery_AdoNetCommon_Completed strError=Le cast spécifié n'est pas valide.

112753.781 23 1 path {Le cast spécifié n'est pas valide.} not found

112753.781 23 1 path {ERROR} not found

112753.781 23 1 path {error} not found

112753.796 23 1 HangupCall, source=oVgmDbQuery_AdoNetCommon_Completed ERROR, WorkModeScript=Running_Normal, yLineStateAppPov=[Connected], lPlayId=0, lRecId=0

112753.796 23 1 ScriptState set Stopping, (called from HangupCall)

112753.796 23 1 ls set Disconnect_Pending

112753.796 23 1 state Hanging up... [oVgmDbQuery_AdoNetCommon_Completed ERROR]

112753.796 23 1 rv add [Hangup Source]{oVgmDbQuery_AdoNetCommon_Completed ERROR}

112753.796 23 1 GoOnHoook_IssueDropCall start (crn=20000001)

 

 

NB: this query works fine using phpmyadmin

any adea?

 

 

Tkx

Mh

Share this post


Link to post

Indeed when removing the count there is no more error.

So seems that there is an issue withe that query

 

Mh

Share this post


Link to post

The DB Query module creates an $RV which gives you the count of the retrieved entries. Not sure though if in this case that $RV will hold the value that you want.

Share this post


Link to post

I have found a work around. I just create a view that executes my query, then I call the view with a basic "select * from view" so that VG module is not confused ;-)

 

 

tkx

 

Share this post


Link to post

The query in the Database Query module is just passed as is (after $RV substitution) to the ADO.NET data provider. The error that you were seeing was returned by MySQL's ADO.NET data provider, not by VoiceGuide.

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
×