Subject | Re: Updatable TIB_Cursor |
---|---|
Author | achidan |
Post date | 2004-03-01T20:53:04Z |
I wrote again:
cur.KeyFields[0]
then I get .AsInteger = 0 and .IsNull = false
KeyFields is not pointing to FieldByName('ID'), but maybe that's as
designed.
I can set the value for KeyFields[0], then the update is working as
expected but I'm not very happing with setting the KeyField by myself.
Do I miss something?
Thanks for any help.
Daniel Achermann
> I found now out that I can set the property SearchedEdits to true, soI found out, that the field 'ID' is set, but if I check
> that the update statement is using the KeyLinks to update the row. Now
> it looks like that
>
> UPDATE Table1
> SET Field1 = ?, Field2 = ?, Field3 = ?
> WHERE ID = ?
>
> which seems to be correct.
>
> But the value provided for ID is always 0. Why? When I do
>
> ShowMessage(cur.FieldByName('ID').AsString)
>
> then I get a correct value for ID. So the correct ID is in my cursor
> but not it seems not to be in the Old_ID.
>
cur.KeyFields[0]
then I get .AsInteger = 0 and .IsNull = false
KeyFields is not pointing to FieldByName('ID'), but maybe that's as
designed.
I can set the value for KeyFields[0], then the update is working as
expected but I'm not very happing with setting the KeyField by myself.
Do I miss something?
Thanks for any help.
Daniel Achermann