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 ?
Don't use quotes, and prefix the variables with dollar signs. Your query should look like this:
where msgNumber and telephoneNumber are either String or Integer variables (depending on your database schema).
Thanks for tip, I wasn't sure of the syntax.
Here is what I have now.
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
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.