Subject [IBO] Re: After posting the previous record is located
Author patrick_marten
--- In IBObjects@yahoogroups.com, "patrick_marten" wrote:
>
> Jason,
>
> a while ago I've sent you a sample project, but didn't hear back from you.
>
> Now the problem appeared at another palce in my application and it's much more critical:
>
> I'm doing an append, setting some field values, post the query and edit it straight afterwards. If KeyLinksAutoDefine is set to true, the record ID changes from let's say 51 to 52... If I set KeyLinksAutoDefine to false and type in ID as my keyfield, everything works fine... Most - if not all - of my queries are set up like that... With this error I don't feel well to release my application... It has worked before all the time - don't know since when it has changed...
>
> Did you find out anything with the help of my sample project?
>
small addition:
this seems to get caused by the following:
if there is an unique constraint field, which I don't assign a value to before the first post. Then the ID of the new record suddenly becomes 0 and once I do an edit after the post, the ID becomes one more, i.e. it looks as if an insert is being executed in such a case. Sounds strange, but seems to be like that...