Anyone know FoxPro?

I need to write a command to manipulate data in a single FoxPro table and I have no idea what the syntax would be.

Basically, I need to find out when the value of three fields in one record are duplicated in the another record. Then take a specific field in the second record and add a character to the value to make the record unique.

The program I’m running is finding the same value in three fields in mulitple records and then hangs up on an endless loop(I think). I need to make these records different from each other and by simply adding a character to one of them it will become unique. I can’t, however, simply add a character to all 10K+ records for reasons I wont bother explaining.

So, anyone know the command or at least the basis of the command so that I could start messing around with it?

Thanks

I’d need more information. Are the three fields constant or can they be any fields in the table? Is there a unique key for each record in the table? Is this a one time thing, where once you “fix” the table it’ll then be done with? A code snippet would be most helpful…

Disclaimer: I haven’t worked with FoxPro since version 2.6 when it still ran on DOS (from before it was bought by Microsoft), but I have some ideas. Also, I no longer use Windows, so I don’t have the FoxPro help files available - meaning that I can’t help with syntax. But it sounds like your problem is more with functionality, not syntax.

Kramer

VanLandry, I am working on this during my idle moments.

I am a current user of Visual FoxPro, more as a software designer and implementor than as a real user, and my knowledge is pretty up-to-date.

I will try to make up a simple sequence that you can adapt to your own needs, but I would like to know:

Is this a procedure you will use more than once, or can we implement it as a one-time ‘conversion’ utility?

Can we assume the fields concerned are character strings, and that there is no length problem with your scheme of adding (by which I mean appending) a character at the end of the string?

Furthermore, I think a single command is probably not feasible, but a short SCAN loop might do the trick, expecially if this is a one-time utility.

I have worked with dBase II->III->Clipper->FoxBase->FoxPro since 1978, but my development was arrested when the windows version came out. I work with the DOS version daily.

Still, the functions/programs you need are probably not windows-dependent. Give us some more details and examples. What is the structure of the file(s)? Are you working with a single file and querying records or comparing two files? Give us some field names, types and sample data.

Better yet, email me a piece of the file with sample data, if you have one. Chop off a couple hundred records if need be and send it as a dbf file.