Tuesday 29 April 2014

UCCX7 Connecting to MSSQL5.5

This is a document about how uccx7 uses ODBC driver to connect MySQL 5.5 server and get the values from the database .
feel free to download script for this post
Use sql query to create a test database
The below command will show created database – books
Enter the database
Use the sql query below to create a table
create table books (BOOK_ID INT, BOOK_NAME varchar(20), AUTHOR_NAME varchar(20), BOOK_ISBN int, PUBLISH_YEAR int)


Insert data
insert into books (BOOK_ID,BOOK_NAME,AUTHOR_NAME,BOOK_ISBN,PUBLISH_YEAR) values (12345,"Game of Trones2","George R. R. Martin2",28137483,"2996")

Show the current table with data inserted
Alter column type to text, otherwise, uccx will translate values using Unicode

Install ODBC driver in uccx 7
First should install VC++ first
ODBC driver for MySQL
it's better to download noinstall zip file:
http://dev.mysql.com/downloads/connector/odbc/3.51.html
After install the driver, configure connection to MySQL
Be sure that driver is properly installed
New a new system data source
Test connection


Set up external database in uccx7 configuration page

Open script editor
Write in the following variables for captured values to store locally
Before get values from database, need to read table using select sql query
“1” seems like a Boolean value, which means the query is properly executed.


db_get is to store data from database to local variables
Map out variables based on specific databse
Test script
Values are reading properly

No comments:

Post a Comment