cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
686
Views
0
Helpful
6
Replies

write to a DB

jamjam200
Level 1
Level 1

could some one confirm what I am doing is corret, I am trying to insert a value into a database from a variable.

so i have

1) created the SQL database

2) added a column called Number (type = string)

3) created the DSN

4) added a DB read

5) can sucessfully access the database

6) added a string variable called Number default value="12345"

7) added a DB write

8) entered this SQL

INSERT INTO tbl_number (Number) values $Number

9) SQL test returns 0

does not update the table

6 Replies 6

Chris Deren
Hall of Fame
Hall of Fame

Make sure that the DSN dbuser has write privilages to that table.

Chris

it updates if I use this query

INSERT INTO tbl_number (Number) values ('500')

What is the string size in the table? Atleast characters? The syntax is correct. So, it should work if the varchar field size fits the string passed

Also, trace your DB Steps. Then, you can see the actual error in the MIVR log

I have noticed that the script works fine with int but not with string values, it seems that text in SQL uses single quotes ' ' where CRS uses double quotes " " there must be a way round this?

Hello,

We just recently received a request to have caller's input saved into an SQL DB as well, and I'm having a bit of trouble getting this done.

Would anyone have a sample IVR script that I could look at to get more familiar with how this can work?