Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
WzImport.app Wizard - Field Name 10 chr limit ???
Message
From
27/04/2004 21:48:43
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Other
Title:
WzImport.app Wizard - Field Name 10 chr limit ???
Miscellaneous
Thread ID:
00898799
Message ID:
00898799
Views:
73
Has anyone modified (improved) the wzImport.app program so it can handle
field names longer than 10 characters. I understand this limit as it
relates to free tables but it should not be an issue if the imported file is
going to part of a DBC, correct?

I've made an effort to do the above and indeed made some progress. After
the import wizard handles the initial import (in my case, from an Excel CSV
file) it allows you to rename the field names. The 10 character limit
applies here, too. This is restricted by the some code in the class
library:

if len(alltrim(this.Value)) > 10
thisformset.Alert(FIELDNAMETOOLONG_LOC)
return 0
endif

By just removing the > 10 limit and adjusting the width of the txtBox you
can then edit field names to exceed the 10 character limit. ... some success but ....

What I really wanted is for import process to use complete field
name from the first record of the Excel data, regardless of length (up to the
max supported by VFP), rather than just allowing me to manually edit the field name beyond the 10 character limit. After poking around in the class library and prgs I found some other code that I think controls this procdure: MakeFieldName

This line of code but appears in that section and seems to apply the 10
character limit:
aRecord(m.i) = LEFT(ALLTRIM(aRecord(m.i)), 10)

However, simply removing the LEFT() function causes an error:

Error #1115 in createtestcursor (0): Invalid operation for the cursor.

So, obviously it's not going to be as easy as removing the Left() fucntion.

Has anyone fixed this or know of a better import program than the
wzImport.app?

Thanks,

Robert Wright
Next
Reply
Map
View

Click here to load this message in the networking platform