Hi
According to windows' numeric format (decimal symbol) a direct
query returns different results for a numeric value
For example if the real result is 2000
- when decimal separator is ".' (point) query returns 2000.00
- when decimal separator is "," (comma) query returns 200000.00
What do I have to set for my query to get the real result no matter
how the workstation is configured?
HiHi, Claudio H
According to windows' numeric format (decimal symbol) a direct query returns different results for a numeric value
For example if the real result is 2000
- when decimal separator is ".' (point) query returns 2000.00
- when decimal separator is "," (comma) query returns 200000.00
What do I have to set for my query to get the real result no matter how the workstation is configured?
Regards
Claudio H
If windows' numeric local setting for decimal separator is "." (point) aAlivios[1][2] value is 2000 but if decimal separator is "," (comma)
the returned value in the array element is 200000
I already contacted Luiz but unfortunately he quit answering
my emails long time ago...
Hi all
I have no problem connecting to the DB (Ariel), using MSSQL with {ODBC Driver 17 for SQL Server}
The workstation running the xHb app (David) has windows 10 OS, the server where MS-SQL is installed is a windows server machine.
I'm inserting a value in a numeric column [importe numeric (15,2)] for example 2000 (no decimals, no decimal separator included)
When retrieving the data via SQLRDD:
cSQLCommand:="SELECT SessionID, Importe FROM MOBINVSE"
aAlivios:=ARRAY(0)
nSQLRet:=oSQL:Exec(cSQLComm,,.T.,@aAlivios,,,,,,,.F.)
If windows' numeric local setting for decimal separator is "." (point) aAlivios[1][2] value is 2000 but if decimal separator is "," (comma) the returned value in the array element is 200000
I can change this setting back and forth as many times as I wish and the result changes according to this setting.
I'm guessing it has to do with an internal SQLRDD setting but couldn't find any helping reference in the docs.
Any idea?
Regards
Claudio H
David
I already contacted Luiz but unfortunately he quit answering my emails long time ago...
Claudio H
Ariel, EllaHi, claudio
Thank you both for your suggestions but none worked.
So far only way to success is changing number formats in control panel (decimal symbol and digit grouping symbol)
SSMS returns the correct values, no matter the settings.
Regards
Claudio H
Ariel, Ella
Thank you both for your suggestions but none worked.
So far only way to success is changing number formats in control panel (decimal symbol and digit grouping symbol)
SSMS returns the correct values, no matter the settings.
Regards
Claudio H
Hi Ella
Thanks for this info.
It really helps as a temporary shortcut while hoping anyone can check and find out if the origin of this issue is within sqlrdd or maybe in xhb's odbc source.
Regards
Claudio H
Sysop: | Keyop |
---|---|
Location: | Huddersfield, West Yorkshire, UK |
Users: | 251 |
Nodes: | 16 (2 / 14) |
Uptime: | 70:22:11 |
Calls: | 5,561 |
Calls today: | 4 |
Files: | 11,680 |
Messages: | 5,122,611 |