Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
SQL Server numeric data type conversion
Message
De
29/09/2003 17:00:40
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Client/serveur
Divers
Thread ID:
00833234
Message ID:
00833307
Vues:
21
This message has been marked as a message which has helped to the initial question of the thread.
Hi Paul,

The answer of Sergey is correct.

In SQL numeric(p, s):
p it indicates the number of digits (1..38)
s is the number of decimals, and is fixed.

In VFP N(n, d):
n (1..15) it indicates the occupied length in order to store the value
(sign, digits and point decimates them)
d is the max number of decimals, IT IS NOT FIXED.

Example:
CLEAR
CREATE CURSOR xx (nn N(6,2)) && traslate of SQL numeric(4,2)
* you can put ###### or ####.# or ###.## numeric values
APPEND BLANK
REPLACE nn WITH 99.99   && ok for SQL
? nn
REPLACE nn WITH 999999  && this is a SQL (6,0)
? nn
REPLACE nn WITH 9999.99 && this is rouded
? nn
Then, you must put a strong control on your numeric VFP values.

Fabio
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform