Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Odd behavior with AFIELDS function
Message
From
16/11/2008 09:29:58
Dragan Nedeljkovich
Now officially retired
Zrenjanin, Serbia
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00035943
Message ID:
01362135
Views:
21
>>
>> WAIT WINDOW "TYPE(lcNumFields) = " + TYPE('t')
>> ?t
>
>
>Your table has a field named t, and if you reference a variable with no
>alias, you get the field from a currently selected table, as a default.
>So, if you ask for Type("t"), what you really get is Type("tmp.t"). What
>you wanted to know is Type("m.t"), which is the correct variable.
>
>> Anyone come across this?
>
>The number of times it came down to a thing like this is too big to be
>nice. That's the main reason all Foxen got used to writing m. before a
>variable - just to make sure.
>
>How can you get table field names preserving the case?

You are hereby pronounced the Knight of VFP Archaeology. That message was 11 years old :).

And the answer is: nikako. No way. You don't. They are written uppercase in the table header. VFP may decide to show them lowercase in some situations (like modify structure dialog), but that's just GUI. The same fields will come up uppercase in aFields(), Field(); lowercase in most of dbgetprop() and/or cursorgetprop() calls (I think, haven't tried too many), view designer and a few other cases.

Just a matter of representation. Inside, they are uppercase.

back to same old

the first online autobiography, unfinished by design
What, me reckless? I'm full of recks!
Balkans, eh? Count them.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform