Subject | Updatable TIB_Cursor |
---|---|
Author | achidan |
Post date | 2004-03-01T16:22:26Z |
Hi!
With IBObjects 4.3Aa I have the following problem. I have a TIB_Cursor
with a SQL
SELECT * FROM Table1 join Table2 on Table1.ID = Table2.ID
WHERE Table1.ID = :pID
I set the properties
KeyRelation := 'Table1';
KeyLinks.Add('Table1.ID')
RequestLive := true;
First I do
IB_Cursor.Edit;
IB_Cursor.FieldByName('Field1').AsString := 'NewValue';
....
When I want to post the cursor to the server I get the error:
-510: Cursor not updatable
When trace my SQL then I find the following update statement:
UPDATE Table1
SET Field1 = ? , Field2 = ? , Field3 = ?
WHERE CURRENT OF C17162776976181598
What is this C171....? Is that an RDB$Key?
Anyone has an idea, what I'm doing wrong?
By the way: I found the error a bit funny because first I didn't set
KeyRelation and KeyLinks at all - then there was no error but the row
in the database just got never updated in the database (but the value
was in the buffer in TIB_Cursor on client side). After setting the
properties "correctly" (as I thought....) I got an error...
Thanks for any help!
Daniel Achermann
With IBObjects 4.3Aa I have the following problem. I have a TIB_Cursor
with a SQL
SELECT * FROM Table1 join Table2 on Table1.ID = Table2.ID
WHERE Table1.ID = :pID
I set the properties
KeyRelation := 'Table1';
KeyLinks.Add('Table1.ID')
RequestLive := true;
First I do
IB_Cursor.Edit;
IB_Cursor.FieldByName('Field1').AsString := 'NewValue';
....
When I want to post the cursor to the server I get the error:
-510: Cursor not updatable
When trace my SQL then I find the following update statement:
UPDATE Table1
SET Field1 = ? , Field2 = ? , Field3 = ?
WHERE CURRENT OF C17162776976181598
What is this C171....? Is that an RDB$Key?
Anyone has an idea, what I'm doing wrong?
By the way: I found the error a bit funny because first I didn't set
KeyRelation and KeyLinks at all - then there was no error but the row
in the database just got never updated in the database (but the value
was in the buffer in TIB_Cursor on client side). After setting the
properties "correctly" (as I thought....) I got an error...
Thanks for any help!
Daniel Achermann