Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Internationalization problem
Message
De
29/05/2007 11:01:03
 
 
À
18/05/2007 16:40:45
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivie
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
01226947
Message ID:
01229061
Vues:
15
This is to post the actual solution we arrived at and hopefully help others if they run into the same problem.

PROBLEM: Remote view of an Oracle data using 'comma' as the decimal point will return a query (data) that has the following behavior:
1. Displays field: QTY value 1.99 as 1,99 in the Browse window. This is the correct behavior.
2. ? QTY will show 1.0000 <- This is wrong.

OBSERVATION: While the data 'looks' okay visually; the underlying value stored in the view is incorrect.

SETUP:
1. Oracle database using UTF-8 as NLS_LANG with a table with a NUMBER(10,2) column containing a data such as: 1,99
2. Oracle ODBC driver uses the NLS_LANG=RUSSIAN_RUSSIA.CL8MSWIN1251 in the HOME0 key in the Windows Registry.
3. Windows Regional Setting is Russian locale.
4. VFPSP1 uses CONFIG.FPW with CODEPAGE=1251
5. All tables have CPDBF() = 1251
6. SET SYSFORMATS ON; will also inherit SET POINT TO ','
7. All visual classes inherits a FONTCHARSET=204 && Cyrillic, configurable.

SOLUTION: Force the data-mapping of NUMERIC with decimal places to CURRENCY.
*code-snippet
cConnstring = 'Driver=;SERVER=;DBQ=;UID=;PWD=;" && <- change to actual values
create database test
create connection test connstring (cConnstring)
create sql view rv_test remote connection test shared as ;
   select pkfield, qtyfield from testtable
* Open the view and force the data-mapping to currency.
use rv_test nodata
dbsetprop("rv_test.qtyfield","Field","DataType","Y")
*EDIT: corrected view name
ramil
~~ learning to stand still
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform