Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Field naming conventions in SQL
Message
From
11/12/2000 11:50:14
 
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00450333
Message ID:
00451643
Views:
27
Hi Houston.

>When it comes to indicating data type, why should field names be any less appropriate than variables (and in my case properties)?

I don't think it's inappropriate; I just consider it unnecessary. In the case of variables and object properties, there's no way to know what type of data can be stored in them, so a naming convention tells other developers (and yourself <g>) what data type to use and expect since VFP won't give an error when you try to store the wrong data type to a value or custom property. However, in the case of a field, doing something REPLACE COMPANY WITH 5 will result in an error if COMPANY is Character. Also, if I need to check the data type of a field in a table, it takes about 5 seconds to USE and DISP STRU.

Of course, I certainly wouldn't suggest that someone stop using such a convention if they're comfortable using it. I just personally haven't needed such a convention in my 20 years of development experience.

Doug
Previous
Reply
Map
View

Click here to load this message in the networking platform