General information
Category:
The Mere Mortals Framework
Jason,
Thanks for the feedback. I actually figured out my problem. I had the autogenerateprimarykey to .t. - thanks for pointing it out to me though - I think I was just lucky to have somehow wet it to true! The problem was with my newid() function.
>How are you creating the new record? If you're using BizObj.New(), and you kept the default value = .T. of cDynamicCursor.lAutoGeneratePrimaryKey (in cDataEnv.vcx) the value is "pre-fetched" into the new view record. This allows you to do exactly what you're referring to.
>
>If you see the ID in the view, but the table ends up with a different value (usually 1 greater than the view) make sure the PK field is updateable in the view.
>
>You *definitely* don't want to rely on a requery to populate your view, as I'm sure you're discovering!
>
>Hope that helps.
>---J
>
>>I have a view with a primary key field, which is set to autogenerate in the business object. However, after save is called, there is no key in the key field of the view. This prevents me from calling other views based on this key field.
>>
>>How can I access the auto-generated value? If the bizobj is set to autogenerate primary keys, shouldn't it be placed in the view?
>>
>>At this point, I'm requerying the whole view, which has too much of a lag.
>>
>>Thanks,
>>
>>David
Previous
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only