field limit of foxpro

2007-01-15 6:14 am
When I try to create a table & set the field format in foxpro table, but I find that the field name has a limit of 10 character . So I could not type more than 10 characters for each field name.
Would you like to tell me how to increase the field limit ?

回答 (1)

2007-01-18 3:52 am
✔ 最佳答案
yes, vfp ( Visual Foxpro ) or Foxpro can be used the filed name for 10 character only from foxbase to VFP 9.0. No any method can extend it.

following message is copied form MSDN site:
for VFP 8.0

Naming Fields You specify field names as you build a new table. These field names can be 10 characters long for free tables or 128 characters long for database tables. If you remove a table from a database, the table's long field names are truncated to 10 characters.
http://msdn2.microsoft.com/en-us/library/aa975810(VS.71).aspx

for VFP 9.0
Considerations for Choosing Field Names For database fields, Visual FoxPro stores the first 10 characters of the field name in the table (.dbf) file and the long name for the field in the database (.dbc) file. The rules for creating long field names are the same as those for creating any Visual FoxPro identifier except that database field names can contain up to 128 characters. For more information, see Creating Visual FoxPro Names.
However, as long as a table is associated with a database, you must use the long field names to refer to table fields, not the 10-character field names. If you remove a table from a database, the long names for the fields are lost, and you must use the 10-character field names stored in the table (.dbf) file as the field names.
If the first 10 characters in the long name are not unique in the table, Visual FoxPro generates a field name consisting of the first n characters in the long name appended by a sequential number for a total of 10 characters. The following table lists examples of generated names.
http://msdn2.microsoft.com/en-us/library/zzsfyd27(VS.80).aspx#dgconfieldcreationanchor3



收錄日期: 2021-04-29 14:09:12
原文連結 [永久失效]:
http://hk.knowledge.yahoo.com:80/question/question?qid=7007011405463

檢視 Wayback Machine 備份