Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Primary Key not unique error
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
CodeMine
Divers
Thread ID:
00874065
Message ID:
00874653
Vues:
24
>Should I not have the default value for the my primary key set to PrimaryKey() in the view? It is set that way on the base tables. I have done this in the past with no problems.<

Well, I would think you would check "Auto-Assign Primary Key for new records" in the CodeMine Cursor Properties dialog for the view. I assume this is what you are talking about.

However, the reason I suggested you take a look at the cmDataManager.AfterNew() was becuase of the way you said 'appending your view' to the table, or something like that. I was assuming you were doing this somehow through code instead of just using the regular CodeMine save button - which then does call the Primarykey() routine of CodeMine. This way, right before you make the changes to the view, you know you are getting a unique PrimaryKey() as CodeMine flags the AppReg01 with this PrimaryKey() value so the 2nd user can not use the same one when it flags the AppReg01 with its primarykey value.

I am not sure this is all of your problem, but it looks like to me it would be somewhere in this area.

Perhaps the big guy Gary or someone else will jump in here if this doesn't fix your problem.

HTH's

Mel Cummings
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform