Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Help with primary key
Message
From
25/07/2005 00:03:48
 
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Environment versions
Visual FoxPro:
VFP 9
OS:
Windows XP SP2
Network:
Windows XP
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01035448
Message ID:
01035589
Views:
17
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.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform