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 derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

importing records - field length problem

Status
Not open for further replies.

buddyrich2

Technical User
Apr 12, 2006
87
US
Surely there has been some advice written on this topic but I cannot find it.

I need to import a large number of data files from other databases (not foxpro). As you know, the field lengths are usually alot longer than what Foxpro allows. If you just import it like it is, you often get duplicate field names, which of course, foxpro doesn't like.

I usually have to change them by hand to another (similar) name, then import. Since I have to do files on a large scale basis, does anyone have any suggestions on how to automate this process or at least some hints to make it easier?

Thanks.
 
I'm sure this will be possible, but you need to give us some more information.

What format are the files in?

In what sense are some of the fields "a lot longer than what Foxpro allows". VFP supports memo fields, which can be as long as you like (for most practical purposes). Are your long fields something other than character fields?

Why do you get duplicate field names? It's unlikely that your source database supports duplicate field names, so why does the problem arise on import?

Give us this information and someone here will probably be able to help.

Mike

__________________________________
Mike Lewis (Edinburgh, Scotland)

Visual FoxPro tips, advice, training, consultancy
Custom software for your business
 
Mike

I *think* he means an import from something like Access or Delphi, which allow very long field NAMES with spaces and the like... rather than the length of the data itself.

VFP limits you to (is it) eleven characters for a free table field name - longer if the table is in a database, but no spaces in the field names (and probably no digits for the first character).

You probably end up with truncated field names and digits on the end to differentiate them

Regards

Griff
Keep [Smile]ing

There are 10 kinds of people in the world, those who understand binary and those who don't.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top