Different SQL result with Robotask?!

Discuss RoboTask here
Post Reply
userXXX
Posts: 58
Joined: Wed Jun 11, 2014 8:45 am

Different SQL result with Robotask?!

Post by userXXX »

Hello,

the used database is Oracle 11g, Robotask is running inside a VM.

The simple SQL "select to_number('123,45') from dual" returns ...
...within SQLPlus: 123,45 as a number
...within Robotask: "Invalid number"

Any idea?
Attachments
to_number.gif
to_number.gif (23.35 KiB) Viewed 32672 times
userXXX
Posts: 58
Joined: Wed Jun 11, 2014 8:45 am

Re: Different SQL result with Robotask?!

Post by userXXX »

This seems to work:
select TO_NUMBER('123,45', '99999999999999999999D9999999', 'NLS_NUMERIC_CHARACTERS = '', ''') from dual

I'm using Robotask 6.2 now. With one of the previous versions ...to_number('123,45')... did work fine. Was something changed for the current version?
Oleg
Site Admin
Posts: 3202
Joined: Thu Jan 01, 1970 1:00 am
Contact:

Re: Different SQL result with Robotask?!

Post by Oleg »

Maybe the different you have regional settings for opened session.
If I remember correctly you can set some default settings for "SQL Plus"
But RoboTask uses default settings for your system.
Try to change "Locale identifier" in the connection string of the query
Locale.png
Locale.png (34.13 KiB) Viewed 32668 times
Oleg Yershov
Oleg
Site Admin
Posts: 3202
Joined: Thu Jan 01, 1970 1:00 am
Contact:

Re: Different SQL result with Robotask?!

Post by Oleg »

Was something changed for the current version?
No changes. Maybe you made changes in Oracle client: install new version or patches
Oleg Yershov
userXXX
Posts: 58
Joined: Wed Jun 11, 2014 8:45 am

Re: Different SQL result with Robotask?!

Post by userXXX »

Oleg wrote:Try to change "Locale identifier" in the connection string of the query
This seems to have no effect:
The connection string doesn't contain this parameter, even if I change it.
userXXX
Posts: 58
Joined: Wed Jun 11, 2014 8:45 am

Re: Different SQL result with Robotask?!

Post by userXXX »

Oleg wrote:No changes. Maybe you made changes in Oracle client: install new version or patches
No changes were made for Oracle client. I only installed a new version of Robotask.
It's possible to solve the problem by using NLS parameters, but it's a bit complicated using them for the first time... :?
Oleg
Site Admin
Posts: 3202
Joined: Thu Jan 01, 1970 1:00 am
Contact:

Re: Different SQL result with Robotask?!

Post by Oleg »

The connection string doesn't contain this parameter, even if I change it.
You can add this manually. For example:
Locale Identifier=1031

1031 - German locale
Oleg Yershov
Oleg
Site Admin
Posts: 3202
Joined: Thu Jan 01, 1970 1:00 am
Contact:

Re: Different SQL result with Robotask?!

Post by Oleg »

No changes were made for Oracle client. I only installed a new version of Robotask.
Apparently some changes are exist

RoboTask uses system ADO data interface. By-turn the ADO engine uses DLL of native Oracle client.

I can advise you to install (if it necessary) native Oracle interface for ADO and ODBC and use it.
See screenshot:
ADO.png
ADO.png (51.32 KiB) Viewed 32614 times
Oleg Yershov
userXXX
Posts: 58
Joined: Wed Jun 11, 2014 8:45 am

Re: Different SQL result with Robotask?!

Post by userXXX »

Oleg wrote:You can add this manually. For example:
Locale Identifier=1031
1031 - German locale
My connect string looks now like this:
Provider=OraOLEDB.Oracle.1;Password=<...>;Persist Security Info=True;User ID=<...>;Data Source=<...>;Locale Identifier=1031

Unfortunately there's still no change in behaviour.
But at the moment I'm OK with my workarounds.
Post Reply