Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Help with primary key
Message
De
25/07/2005 00:03:48
 
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 9
OS:
Windows XP SP2
Network:
Windows XP
Database:
Visual FoxPro
Divers
Thread ID:
01035448
Message ID:
01035589
Vues:
16
Hi Burt, Hi all,

>DTOS() is easier to read than DTOC(,1)

>To Preserve consistency, what I would do is create the following function
>Function TTOS(tdDate)
>Return TTOC(tcDate,1)

I'd prefer #DEFINE, if you could do some define like
#DEFINE TTOS(a) TTOC(a,1)
but that doesn't even work with a=DateTime().

Consistency advantage and readability or not, with a function or a define you are dependant of that and if you forget to copy that function or define into your next database stored procs, you'll also run into errors. So I'd say use DTOC(dField,1) in the key expression and TTOC(tField,1) with DateTime fields. It's not all that hard to look up or just try out the meaning of ,1 in the command window.

Bye, Olaf.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform