Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Numeric format from remote views

Status
Not open for further replies.

ipazzo

Programmer
Jan 17, 2002
69
IT
I have e remote view on an Oracle DB, when i copy the view on a local temporary table decimal values are rounded! Also when i browse the view i can see exactly all the decimal values, but when i highligth the field the decimal places becomes 0.
Eg.:

img1.bmp


highlighted is

img2.bmp



How can i solve this problem!????




Vito M.
---------------------------------------
When you build a TEAM, try always those that they love to win. If you do not succeed to find them, then try those that they hate to lose. Ross Perot
 
ipazzo

Although not a solution to your problem, may I suggest you try to avoid including bitmap links to all your posts, it take a long time to "download" your posts at 56k.

Mike Gagnon

If you want to get the best response to a question, please check out FAQ184-2483 first.
 
@mgagnon

sorry i forgot to change the resolution, now i have updated the images at less resolution.
I know that my english is bad, and for that i use images to explain my problems. For next posts i will try without images.





Vito M.
---------------------------------------
When you build a TEAM, try always those that they love to win. If you do not succeed to find them, then try those that they hate to lose. Ross Perot
 
Ciao,
I developed using VFox and an Oracle DB and I didn't have this problem... can you paste here your remote view creation script and the Oracle DB creation script.. I could check them... here two of my scripts (the VAT_PERC field is correctly read) :

VFP view

CREATE SQL VIEW vVAT REMOTE CONNECTION Astro SHARE AS ;
SELECT ROWID, VAT_CODE, COUY_CODE, VAT_DESC, VAT_PERC, EXTR_INDC, LAST_MNGD_DATE;
FROM VAT
WHERE ROWID = ?THISFORM.oVAT.xaPKeyValue[1] AND EXTR_INDC <> '2'

Oracle table script

CREATE TABLE ELMEC.VAT
(
COUY_CODE CHAR (3) NOT NULL,
VAT_CODE CHAR (2) NOT NULL,
VAT_DESC VARCHAR2(50) NULL,
VAT_PERC NUMBER (5,2) NOT NULL,
EXTR_INDC CHAR (1) NOT NULL,
LAST_MNGD_DATE DATE NULL
)
PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255 LOGGING STORAGE...

Ciao.


Marco (Italy)
marco.dicesare@elmec.it
 
Are you sure that the Oracle field is a numeric field... this because, usually, even though your field contains a number with only 1 significant decimal number (i.e. 56,7) if the field has 4 decimal places, all the decimal places are showed... so 56,7000... in you example firstly only 1 decimal places is shown and afterwards 4.


Marco (Italy)
marco.dicesare@elmec.it
 
Ciao Marco,

i have found a solution to my problem changing the properties of the numeric field in the VFP view definition from NUMERIC(14,4) to DOUBLE with 4 decimal. Now it works right.

I have also verified the field definition in the oracle DB it is NUMERIC(14,4).

Grazie! ;-)



Vito M.
---------------------------------------
When you build a TEAM, try always those that they love to win. If you do not succeed to find them, then try those that they hate to lose. Ross Perot
 
OK.. but pay attention that

VFP numeric 14,4 is 9 integer pos. + separator + 4 decimals

ORACLE numeric 14,4 is 10 (!!) integer and 4 decimals

This was the reason why you had the problem.





Marco (Italy)
marco.dicesare@elmec.it
 
I have just tried to change again the VFP view definition with NUMERIC(15,4) but i still have the problem.

PS. che casino scrivere in inglese mentre siamo entrambi italiani [3eyes]



Vito M. from BARI (Italy)
---------------------------------------
When you build a TEAM, try always those that they love to win. If you do not succeed to find them, then try those that they hate to lose. Ross Perot
 
Usually I put the views into a database and I create them using the CREATE SQL command. In this way, when you create the view the login to the Oracle DB is requested and the fields properties (type, length...) are automatically created by the CREATE SQL command matching the Oracle properties.

Ciao.


Marco (Italy)
marco.dicesare@elmec.it
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top