Avatar of smithmrk
smithmrkFlag for United States of America

asked on 

FoxPro 9.0 - Free Table (DBF) - Set Fields to be Primary Keys

I have a free standing DBF FoxPro Table that I would like to set a couple of Fields to be Primary Keys so that Duplicate Data doesn't get entered.

I haven't been able to figure out how to do it.

Thanks,
Mark
FoxPro

Avatar of undefined
Last Comment
smithmrk
SOLUTION
Avatar of Pavel Celba
Pavel Celba
Flag of Czechia image

Blurred text
THIS SOLUTION IS ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
SOLUTION
Avatar of Cyril Joudieh
Cyril Joudieh
Flag of Lebanon image

Blurred text
THIS SOLUTION IS ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
Avatar of Pavel Celba
Pavel Celba
Flag of Czechia image

One more note:

If your app uses SET DELETED ON setting then the Candidate index should contain FOR clause:

INDEX ON STR(AccYear,4)+CurrCode TAG YearCurr FOR !DELETED() COLLATE "Machine" CANDIDATE

It will avoid problems with "invisible" duplicities.
ASKER CERTIFIED SOLUTION
Avatar of jrbbldr
jrbbldr

Blurred text
THIS SOLUTION IS ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
Avatar of smithmrk
smithmrk
Flag of United States of America image

ASKER

Quick Update...I got stuck on a other project and haven't had time to get back to this.
I wanted to let everyone know I've looked over all your wonderful comments and suggestions, I just haven't had time to test out anything as of yet.

Stay tune...next week for sure!

Thanks,
Mark
Avatar of smithmrk
smithmrk
Flag of United States of America image

ASKER

Still haven't had time to test out these solutions, but I've had to move onto other projects and tasks.

I didn't want to leave this question hanging out there forever so I gave each of you the same amount of points.  If I ever do get back to this...I will try your solutions and follow up at that time.

Thanks again!
Mark
FoxPro
FoxPro

Visual FoxPro (VFP), and its predecessor FoxPro, is a data-centric, object-oriented, procedural, database programming language and IDE from Microsoft last released in 2007 that still has some active use due to its low cost of deployment and fairly rapid development. In 2008, Microsoft released a set of add-ons for VFP's xBase components to allow interoperability with various Microsoft technologies. It allows data processing against its native file-based data tables or database servers such as SQL Server.

11K
Questions
--
Followers
--
Top Experts
Get a personalized solution from industry experts
Ask the experts
Read over 600 more reviews

TRUSTED BY

IBM logoIntel logoMicrosoft logoUbisoft logoSAP logo
Qualcomm logoCitrix Systems logoWorkday logoErnst & Young logo
High performer badgeUsers love us badge
LinkedIn logoFacebook logoX logoInstagram logoTikTok logoYouTube logo