Solved Cannot select decimal data from Oracle (TD 7.0.2)

Report bugs and possible workarounds.
ltuske
Hungary
Posts: 4
Joined: 02 Oct 2017, 09:47
Location: Érd, Hungary

Cannot select decimal data from Oracle (TD 7.0.2)

Post by ltuske » 02 Oct 2017, 10:58

TD can not select decimal data from Oracle database into table column or datafield (from numeric field to numeric column or datafield).
It results the

"104 Attemp to fetch non-numeric data into numeric column"

SQL Error.
The same select works when the Oracle datafields contains only integer numbers and does not work when the Oracle datafields contains decimal parts of the numbers.

The enviroment:
Windows 10 Pro
Oracle Client 12.2
TD 7.0.2 w32

Dave Rabelink
Founder/Site Admin
Founder/Site Admin
Netherlands
Posts: 1102
Joined: 24 Feb 2017, 09:12
Location: Gouda, The Netherlands

Cannot select decimal data from Oracle (TD 7.0.2)

Post by Dave Rabelink » 02 Oct 2017, 11:59

Maybe this thread gives a solution?

viewtopic.php?f=57&t=37249&hilit=oracle ... or#p125389

If not, please use the forum search option here:

search.php?keywords=oracle+decimal+erro ... mit=Search
Regards,
Dave Rabelink

Image
Articles and information on Team Developer Tips & Tricks Wiki
Download samples, documents and resources from TD Sample Vault
Videos on TDWiki YouTube Channel

ltuske
Hungary
Posts: 4
Joined: 02 Oct 2017, 09:47
Location: Érd, Hungary

Cannot select decimal data from Oracle (TD 7.0.2)

Post by ltuske » 02 Oct 2017, 13:13

The problem is solved.

The topic viewtopic.php?f=57&t=37249&hilit=oracle ... or#p125389 was useful with the following notes.
The Oracle client 12.2... does not have any registry entry so the NLS_NUMERIC_CHARACTERS registry entry does not work in that case.
If your regional setting of client different from US English You have to add NLS_NUMERIC_CHARACTERS system variable to your system.
The right order of the parameters: decimal point then thounsand separator.
For Example NLS_NUMERIC_CHARACTERS=". " In that case the decimal sepeartor is '.' character and the thousand separator is ' ' character.

Thanks a lot.

thomas.uttendorfer
Site Admin
Site Admin
Germany
Posts: 147
Joined: 05 Mar 2017, 17:19
Location: Munich Germany

Cannot select decimal data from Oracle (TD 7.0.2)

Post by thomas.uttendorfer » 02 Oct 2017, 15:24

Hi,
you can also do this by Gupta code:

Code: Select all

Call SqlPrepareAndExecute(hSqlApp, 'ALTER SESSION SET NLS_NUMERIC_CHARACTERS = \'.,\'' )
Same with dateformat:

Code: Select all

Call SqlPrepareAndExecute(hSqlApp, 'ALTER SESSION SET NLS_DATE_FORMAT = \'yyyy-mm-dd\'' )
Regards Thomas
Thomas Uttendorfer
[ frevel & fey ] Software-System GmbH
https://thomasuttendorfer.wordpress.com/

Return to “Bug Reports”

Who is online

Users browsing this forum: [Ccbot] and 1 guest