Warning message

  • Cisco Support Forums is in Read Only mode while the site is being migrated.
  • Cisco Support Forums is in Read Only mode while the site is being migrated.

Issue with DB Write step in IVR Script - Problem using variable for insert

Unanswered Question
Mar 3rd, 2004
User Badges:

I'm using the following syntax to write to a database in a IVR script.

INSERT INTO call_log




The above works fine, However when I substitute the variable name instead of the straight text the write doesn't work.

Is there a syntax issue that I'm missing? All the docs that I find show examples of writing actual values not variables.

I'm substituting the variable name for the values listed above. If I leave the quotes then I get the variable NAME inserted in to the database. If I remove the quotes the insert fails.

Any ideas ?

  • 1
  • 2
  • 3
  • 4
  • 5
Overall Rating: 0 (0 ratings)
jasyoung Wed, 03/03/2004 - 05:33
User Badges:
  • Gold, 750 points or more

Don't use quotes, and prefix the variables with dollar signs. Your query should look like this:

INSERT INTO call_log

(callMSGNum, callTelNumber)


($msgNumber, $telephoneNumber)

where msgNumber and telephoneNumber are either String or Integer variables (depending on your database schema).

bvanbenschoten Fri, 03/05/2004 - 07:59
User Badges:

Thanks for tip, I wasn't sure of the syntax.

Here is what I have now.

INSERT INTO call_log




When I test that I get the following error:

Remote Error java.lang.NullPointerException

I have the columns in SQL defined as type 'varchar' length 50 Do you think I have a type mismatch ?

Or could it be something else

yogeswar Sun, 03/07/2004 - 21:25
User Badges:
  • Silver, 250 points or more


Are you trying to insert Null values into the table which doesnot allow nulls? Also check if you have configured the DB subsystem and the same is in-service.




This Discussion