Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Record Pointer Moving after REQUERY
Message
From
11/11/1999 11:55:29
 
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00290073
Message ID:
00290142
Views:
22
Rich

What I do is call my GetKey() stored proc from the view itself. For example, open up the view designer and from the Fields tab, hit the Properties button and call your stored proc (e.g. GetKey()) from the default value of your primary key. Also, make sure that you mark your primary key field as updatable.

Not only will you have access to the value of the primary key, but I have found that this approach makes for much cleaner TableUpdates.


>Bob,
>
>Thanks I just needed to be slapped! Well, I was trying to get the ID value that was generated by my Stored Procedure code back into my View record.
>
>It doesn't retrieve it from the Refresh(). So I was doing a Requery() as well but retrieves all records again since currently I am pulling in all records for Local Views for single table edits. I am contemplating one record for the future but I will have to change all of my navigation code to support it in my forms.
>
>How should I get back my new ID that was generated?
>
>TIA
- Jeff
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform