Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Internationalization problem
Message
De
29/05/2007 22:51:17
Dragan Nedeljkovich (En ligne)
Now officially retired
Zrenjanin, Serbia
 
 
À
29/05/2007 11:01:03
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
01226947
Message ID:
01229198
Vues:
10
>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 ','

I think you're missing a
SET SEPARATOR TO "."

at this point. Not sure that it's a space - I know it's a period in many countries, as the space creates confusion.

>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

back to same old

the first online autobiography, unfinished by design
What, me reckless? I'm full of recks!
Balkans, eh? Count them.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform