05-10-2017 07:58 AM - edited 03-14-2019 05:17 PM
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!
Solved! Go to Solution.
05-11-2017 04:29 AM
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
05-10-2017 08:10 AM
Run a dumplog on the dbw process on your Call Router.
Regards,
Geoff
05-10-2017 11:36 PM
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 ?
05-11-2017 04:29 AM
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
05-11-2017 04:34 AM
Thank you very much!
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide