Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Primary Key Stored Procedure not firing on Append From
Message
De
22/08/2000 14:31:38
Cindy Winegarden
Duke University Medical Center
Durham, Caroline du Nord, États-Unis
 
 
À
22/08/2000 12:08:04
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00407799
Message ID:
00407892
Vues:
24
Harry,

I ran into a similar problem a couple of weeks back. I was appending from a text file and the stored proc wasn't firing. I decided that somehow VFP saw the non-existent text fields as a bunch of blanks and decided that that was "data" so it didn't need a default value.

I solved the problem by creating an interim cursor which did not have the ID field, then appending from the interim cursor to the main table. Then the stored proc fired and I got nice PK's for my records.

I really wonder why this happens, but I got sidetracked and never posted the question for a "guru" to explain.

Try the interim cursor method and see if it helps you.



>got m'self a cheap and cheerful (and effective) stored procedure for assigning primary keys which is called from the default value for the relevant field.
>
>It works for "append blank" or "insert into" but not for "append from"
>
>I can see that "append from" may, of course, add a whole bunch of records and thus call the routine a whole bunch of times. But a) I've never come across anything that says it can't be done that way and b) if it is going to fall over I'd have expected to fall over at the second appended record. It doesn't even manage one.
>
>what have I missed? and, if it can't be done that way for "Append From", how else can we do it?
>
>Harry
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform