Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Correct way to call DBC stored procedure
Message
 
 
À
26/06/2001 18:47:50
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
00523854
Message ID:
00523919
Vues:
20
>>In my add method I do:
>>lnRegionID=GetNext_ID('Regions')
>>insert into RegionsInfo (RegionID,...) values (m.lnRegionID,...), where RegionsInfo is a view based on Regions table (only this table).
>>
>>The question is: when I save the record, would it try to excecute this GetNext_ID twice, since my table has default value? Right now it seems to be doing that. What should I do to do it only once?
>>
>>Thanks in advance.
>
>If the field has a default value calling GetNext_ID(), you don't include that field in your insert statement. That field will take care of itself...

It would not work this way, because I have a child view, which depends on this field. So, I removed default value from my table field. Seems like this is the only way or I have to hadnle it through some either global variable or form's property...
If it's not broken, fix it until it is.


My Blog
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform