Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Is this a bug in CREATE CURSOR command?
Message
 
 
À
19/12/2004 09:14:54
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Versions des environnements
Visual FoxPro:
VFP 8 SP1
Database:
Visual FoxPro
Divers
Thread ID:
00970382
Message ID:
00970415
Vues:
15
No it's not a bug but bad design desigion made a long time ago. In VFP8 and earlier only the first letter of the type specified is taken and the rest are ignored. IOW, you can put any sequnce of the letter that start with D to create date type field. VFP9 allows a limted number of data types to be used and recognized by VFP. If VFP cannot recognize the data type, it'll use the first letter anyway for reason of backward compability. I, personaly, don't like it but it';s the way it works now. BTW, your code will still creat a data filed in VFP9 because DECIMAL isn't one of recognizable data type by VFP.

>
>Yesterday I was converting a MS SQL script into a VFP Create Cursor command. The script creates tables and I changed it to create VFP cursors. One of the lines in the original script was
>
>CREATE TABLE MyTable (MyField DECIMAL(10,2)).
>
>Surprise, surprise. The above command, modified as CREATE CURSOR MyCursor (MyField DECIMAL(10,2)) does not error, but instead creates a DATE datatype field. Not to mention it took me half of a day to find what the problem is (INSERTS failed constantly and I had thousands of fields in the script).
>
>Further investigations shown that
>
>
>CREATE CURSOR MyCursor (MyField DOLGHIN(10,2))
>
>
>does not error, but instead creates a DATE field in the cursor.
>
>Is this a bug or a known issue?
>
>
>Thank you.
--sb--
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform