Cisco Support Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Announcements

Welcome to Cisco Support Community. We would love to have your feedback.

For an introduction to the new site, click here. If you'd prefer to explore, try our test area to get started. And see here for current known issues.

New Member

DB Read Step in IPCCX 4.0(3)

Hi Folks,

I'm having trouble with the DB Read step.

I have a String variable called Variable1, I have a database with the table ipcc_cust and a varchar field in that table called field1.

I am using the following query in my DB Read step:

SELECT * FROM ipcc_cust WHERE field1 = $Variable1

When I test this, no rows are returned. If I use the folowing query:

SELECT * FROM ipcc_cust WHERE field1 = 'data'

It returns 1 row of data.

When I check the SQL server for the first query, it would appear the IPCC is sending:

SELECT * FROM ipcc_cust WHERE field1 = "data"

So it's sending the exact contents of the Variable and not encapsulating it in ' '.

Is this a bug? Should I be able to query with a string variable or not?

Cheers,

Mike Graham

6 REPLIES

Re: DB Read Step in IPCCX 4.0(3)

What is the database you are using? I know that you can pass string variables to sqlserver and it would work fine. Can you also trace the dB Steps and check the MIVR logs to see what the script is sending.

New Member

Re: DB Read Step in IPCCX 4.0(3)

It turns out that if you dial the script it works properly, sends SELECT * FROM ipcc_cust WHERE field1 = 'data'

If you use the test button in the script editor, it sends SELECT * FROM ipcc_cust WHERE field1 = "data"

Is this a bug or a feature?

Cheers for the help folks,

Re: DB Read Step in IPCCX 4.0(3)

What version? I never had any issues with using the test button ver 3.5.X and below.

Re: DB Read Step in IPCCX 4.0(3)

Also, when you are executing a test (in the DBGet Node) with the $variable1, do you have any data populated in the variable? Even if you are not in debug mode, you can default variable1 to some real data and test using the DBGet node.

New Member

Re: DB Read Step in IPCCX 4.0(3)

Yes, Variable1 has "data" in it.

The SQL shows that IPCC is sending the query incorrectly, it sends "data" instead of 'data'

Also the test button is in the DBRead node not the DBGet node. The DBGet node is for extracting the data returned into variables.

New Member

Re: DB Read Step in IPCCX 4.0(3)

Also it's IPCC Express Premium 4.0(3), sorry missed that bit

176
Views
0
Helpful
6
Replies