Note though that the varchar field in VFP9 does NOT store less spaces, 
iirc.  It's simply for better handling so that you get a value of 
'FOXPRO' instead of 'FOXPRO      ' (with extra/padded spaces on the 
right to fill out the size/width of the field).

I could be wrong, as I haven't used the VFP9 varchar type field.  ???
--Michael

Steve Ellenoff wrote:
> varchar is a variable length character field, meaning varchar(20) 
> will support UP TO MAX of 20 chars, but will store less if your data 
> has less. A char(20) field always stores 20 characters, regardless if 
> your data doesn't fill up the 20 characters. So it's a matter of 
> simply saving space on each record based on the size of your 
> character data. Seek, locate, select sql all work the same for char & 
> varchar fields. The varchar came from SQL Server and was added to 
> Foxpro later on to support moving data between the two.
>
> At 09:24 AM 9/8/2007, you wrote:
>   
>> Can anybody explain what are the differences between the varchar and 
>> the character field types? I would also appreciate examples of use 
>> on commands like SEEK and LOCATE and even in SELECT SQL sentences.
>>
>> Is varchar better than character? Should I change my tables to the 
>> varchar type? Why?
>>
>> TIA
>>
>> Rafael Copquin
>>
>>
>> --- StripMime Report -- processed MIME parts ---
>> multipart/alternative
>>   text/plain (text body -- kept)
>>   text/html
>> ---
>>
>>     
[excessive quoting removed by server]

_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/profox
OT-free version of this list: http://leafe.com/mailman/listinfo/profoxtech
Searchable Archive: http://leafe.com/archives/search/profox
This message: http://leafe.com/archives/byMID/profox/[EMAIL PROTECTED]
** All postings, unless explicitly stated otherwise, are the opinions of the 
author, and do not constitute legal or medical advice. This statement is added 
to the messages for those lawyers who are too stupid to see the obvious.

Reply via email to