cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1304
Views
4
Helpful
4
Replies

DBLookup datetime value in ICM 8.6

Yuriy Ivkin
Level 1
Level 1

Greetings!

 Can anyone give me an example of correct DBLookup value for the datetime type key field.

I have table IsHoliday(HolidayDay datetime, IsHoliday varchar(10)). I add value in table insert into IsHoliday(HolidayDay, IsHoliday) values('2017-05-10','1') and it is successfully selecting from sql management studio: select * from IsHoliday where HolidayDay = '2017-05-10'.

I try to get values with expression in DBLookup: concatenate(text(year(now())),”-”, text(month(now())),”-”, text(day(now()))) but receive in Call Tracer:

> DialedNumber (7488) using CallType (TEST_7488- 5504)

 

Start #1

     Default\TEST_2 {All Customers} (version 2)

 

DB Lookup #2

     False; Script Table not currently available.

 

Release Call #4

> ----------

> Release Call.

What do I do wrong ?

Thanks in advance for your answers!

1 Accepted Solution

Accepted Solutions

0: resultSuccess = 0 - Indicates the result is valid.
1: resultKeyNotFound = 1 - Indicates the lookup data has no match in the lookup table.
2: resultError = 2 - Indicates errors exists in the result.
3: resultUnavailable = 3 - Indicates there is no available result.
4: resultTimeout = 4 - Indicates DBWorker process times out.
5: resultInvalidKeyType = 5 - Indicates the key type is invalid.
6: resultInvalidKeyConversion = 6 - Indicates the key conversion is invalid.
7: resultTableNotFound = 7 - Indicates the requested table is not found.
8: resultRouterTimeout = 8 - Indicates the CallRouter times out. It represents a longer timeout.
9: resultRouterError = 9 - Indicates the CallRouter detects some other problem.
10: resultTooMuchData = 10 - Indicates too much data.

So it's clear that it cannot convert the string you are giving it to a DateTime data type. Try again with Call Tracer - just hard code something like "2017-05-10 00:00" and see if you can make it work.

Regards,
Geoff

View solution in original post

4 Replies 4

geoff
Level 10
Level 10

Run a dumplog on the dbw process on your Call Router.

Regards,
Geoff

Hello Geoff!

Thanks for your answer!

 Log:

09:14:45:628 ra-dbw Trace: DBWorker Thread 1 (ID 5636 Table:IsHoliday): Received request: transactionID 1168332
09:14:45:628 ra-dbw Trace: DBWorker Thread 1 (ID 5636),transactionID 1168332, Attempt to read the record: 
09:14:45:628 ra-dbw Trace: DBWorker transactionID 1168332, Failed! result=6

Where I can find description of the result code ?

0: resultSuccess = 0 - Indicates the result is valid.
1: resultKeyNotFound = 1 - Indicates the lookup data has no match in the lookup table.
2: resultError = 2 - Indicates errors exists in the result.
3: resultUnavailable = 3 - Indicates there is no available result.
4: resultTimeout = 4 - Indicates DBWorker process times out.
5: resultInvalidKeyType = 5 - Indicates the key type is invalid.
6: resultInvalidKeyConversion = 6 - Indicates the key conversion is invalid.
7: resultTableNotFound = 7 - Indicates the requested table is not found.
8: resultRouterTimeout = 8 - Indicates the CallRouter times out. It represents a longer timeout.
9: resultRouterError = 9 - Indicates the CallRouter detects some other problem.
10: resultTooMuchData = 10 - Indicates too much data.

So it's clear that it cannot convert the string you are giving it to a DateTime data type. Try again with Call Tracer - just hard code something like "2017-05-10 00:00" and see if you can make it work.

Regards,
Geoff

Thank you very much!