Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Correct way to call DBC stored procedure
Message
 
 
To
26/06/2001 18:47:50
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00523854
Message ID:
00523919
Views:
19
>>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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform