cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Announcements

Community Helping Community

3381
Views
5
Helpful
33
Replies
Beginner

DB Write Step Does Not Work in CCX Script Editor

Hello all!

I am trying to write some data in external database from CCX script, but "DB Write" step always goes to "SQL Error" although I am using correct SQL syntax. I have checked it through MS SQL Management studio and everything works.

Interesting is the fact, that "DB Read" step works fine!!!

Another weard thing is that making test from "DB Write" step properties shows "Rows altered 1"...

Nearby is commands I am trying to execute with no success:

delete from [Samsung-DK] where Question1=150

and

insert into Samsung-DK(Question1) values (200)

I will very appreciate any help or advice, because I cannot find any clue in Cisco manuals.

Thank you in advance.

33 REPLIES 33
Engager

DB Write Step Does Not Work in CCX Script Editor

Hi,

Please refer the section "DB Write Step" on page 202 onwards in the below document,

http://www.cisco.com/en/US/docs/voice_ip_comm/cust_contact/contact_center/crs/express_8_5/programming/guide/uccx851_step_ref.pdf

Hope it helps,

Anand

Please rate helpful posts..

Beginner

DB Write Step Does Not Work in CCX Script Editor

Some quick advice, check formatting(especially spaces) and use variables. Try just the INSERT command first, then just the DELETE command and see which is broken.

DELETE FROM [Samsung-DK] WHERE Question1 = 150

INSERT INTO Samsung-DK(Question1) VALUES ($Var1)

-store 200 in variable Var1

Beginner

DB Write Step Does Not Work in CCX Script Editor

Thank you, Raymon!

Your advise partially helped. Now I'm using following syntax:

INSERT INTO [Samsung-DK](Question1) VALUES ($Var1)

That is weard, it works in "Test" tab, but uploading script to CCX server this command does nothing. Do you have any clues?

Highlighted
Beginner

DB Write Step Does Not Work in CCX Script Editor

Hi everyone!

I have found that was the problem and a solution for this. Decided to post solution here, just in case someone will experience the same.

The problem was that CCX Script editor can't interconnect different SQL version syntax. On the server, running CCX, I have MS SQL Server 2000, but on the server, running data base, MS SQL Server 2008 is installed. That is interesting, adding ODBC object successed through Administration Tools, but running SQL through scripts reverted to SQL error.

Solution is to install ODBC driver for SQL 2008, create new ODBC object with this driver and everything works with no problems.

Beginner

DB Write Step Does Not Work in CCX Script Editor

Hi Andrejs and others,

Can you please elaborate the steps that how you create DSN and use DB Steps? as we are facing Issue in creating DSN that is required in DB Steps.

Our requirement is as under:

> We have to use DB Write component to log IP IVR related data in custom created tables.

In  my previous experience with UCCX 6.5/7, on Windows 2000 server and SQL  Server, I easily created DSN (using App Admin) that was then available  in DB Tools of CRS Editor.

Kindly help, with UCCX 8.5.1 on Linux and Informix Server, how can I use DB Write tool to use SQL Insert Command.

Kindly note that we have created custom Tables successfully.

Your prompt reply will help us to go forward.

Regards

Kashif Surhio

Advocate

DB Write Step Does Not Work in CCX Script Editor

Hi,

you don't need to change anything in your UCCX scripts, DB write should work fine, unless you use a really exotic, version-specific SQL syntax.

On UCCX 8.5.1, you don't use DSN's. You have to download the JTDS JDBC driver (

http://sourceforge.net/projects/jtds/files/) and upload it to the UCCX using the appadmin web interface.

G.

Beginner

DB Write Step Does Not Work in CCX Script Editor

Hi Gergely

UCCX veriosn 8.5(1)

We want to write/ insert the data from script editor using DBWrite method,  We have created the DSN to the external database, external database is Oracle 10g, the connection is successfully established and tested from Cisco UCCX Datasource web page. But when  we write the Insert statement into the script there is no sysntax error, but the data is not inserted into the database, when we test the query it said 0 rows affedted, we build the query and its syntax is correct as editor save the script successfully. In the database the data is not inserted, but when we delete the data through script editor it says 1 row afftected, so i am confused why data is not inserted into the database table.

Kindly let us know what to do and how to investigate further.

Regards

Adeel Aslam

Advocate

DB Write Step Does Not Work in CCX Script Editor

Hi,

the test function of the DB Write step does not actually write.

Did you try running your script in reactive debugging mode?

Also, please do post your SQL statement - might be a problem with it. And a screenshot of the relevant parts of the DB Write step.

G.

Beginner

DB Write Step Does Not Work in CCX Script Editor

Hi Gergely

Thanks for your prompt reply.

1. Insert Query

INSERT INTO BALANCEINQUIRY (NEWID) VALUES('3')

2. Yes, trying to run the script in the debugging mode and there is no error.

3. At this time i am unable to send you the screen shot,

Kindly let me know if i am missing anything.

Regards

Adeel Aslam

Advocate

DB Write Step Does Not Work in CCX Script Editor

What is the data type of BALANCEINQUIRY.NEWID? Is it VARCHAR or INT?

G.

Beginner

DB Write Step Does Not Work in CCX Script Editor

Hi Gergely

We are using Oracle its Number Type

Advocate

DB Write Step Does Not Work in CCX Script Editor

And if you try

INSERT INTO BALANCEINQUIRY (NEWID) VALUES(3)

?

Beginner

DB Write Step Does Not Work in CCX Script Editor

Same result. record not inserted into table

Advocate

DB Write Step Does Not Work in CCX Script Editor

Alright, can you enable the traces for the database subsystem and database steps, retry the query and then observe the output of catalina.out ?

G.

CreatePlease to create content
Content for Community-Ad
FusionCharts will render here