Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Create From and long field names

Status
Not open for further replies.

SGLong

Programmer
Jun 6, 2000
405
US
I'm having trouble creating a table with long field names from an extended structure file. According to the VFP help file it should be a simple procedure, but I keep getting 'Invalid Structure' messages. I've verified that the field names are unique and that the field lengths are all appropriate for the field types. Any help would be appreciated.
[sig][/sig]
 
My .02

If the table you are creating is a free table, long field names (ie, greater than 10) are not supported.

If the extended structure file contains field names with lengths greater than 10, VFP will truncate all characters after the 10th position. Odds are, after the truncation, you have duplicate field names.

Run this query on your extended structure table:
SELECT LEFT(field_name,10) as uniname from MyFile GROUP BY uniname HAVING COUNT(field_name) > 1 INTO CURSOR mycursor

If any records are returned, you need to modify the field names in your extended structure file or create the table in a database. [sig]<p>Jon Hawkins<br><a href=mailto: jonscott8@yahoo.com> jonscott8@yahoo.com</a><br><a href= > </a><br>The World Is Headed For Mutiny.....When All We Want Is Unity. - Creed[/sig]
 
The table I am attempting to create is to be included in a DBC, and I was opening the DBC prior to running the command. After tinkering around some more after I posted the help request I realized that the problem was my own creation. I had added a field, 'SEQ_NUMB' to the extended file so that I could rearrange the fields into a special sequence. Apparently the 'create from' command doesn't like any extra fields in the extended file. I don't recall that being an issue in FP2.X but it's been so long since I've worked in that platform I could be wrong. Thanks anyhow. [sig][/sig]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top