Subject Cursors losing buffer after insert
Author paulfilmer
Hi all


Maybe somebody can explain this one to me...

I am not retaining the field values when I post a *new* record on a
TIB_Cursor. Editing an existing record is fine. TIB_Query works fine
as well.


My SQL looks something like:
SELECT *
FROM MYTABLE
WHERE (PRIMARY_FIELD = :pPRIMARY_FIELD)


And the code basically acts like:

C_Cursor.ParamByName('pPRIMARY_FIELD').AsInteger := 0;
C_Cursor.Open;
C_Cursor.Edit;
C_Cursor.FieldByName('PRIMARY_FIELD').AsInteger := 123;
... + other fields assigned here.
C_Cursor.Post;

Yet after the post...
C_Cursor.FieldByName('PRIMARY_FIELD').AsInteger = 0
instead of = 123.


I suspect it may have something to do changing the values of the
fields that correlate to the SQL parameters, but I'm not sure.


Is there any property that may be affecting this?


Thanks heaps in advance!


Paul.