Page 1 of 1

6.10.1.10: Field's readonly flag issue.

Posted: Tue 07 Aug 2007 12:56
by MarkF
Hi Folks,

It seems like this has gone back and forth a bit, but I still don't see things working properly in the new release. I'm using TSmartQuery with settings:

Code: Select all

    Query.LockMode := lmLockImmediate;
    Query.Options.FullRefresh := True;
    Query.Options.DeferredLobRead := True;
    Query.Options.CacheLobs := True;
    Query.Options.RawAsString := False;
    Query.Options.QuoteNames := True;
    Query.Options.SetFieldsReadOnly := True;
    Query.Options.FieldsOrigin := False;
    Query.Options.RequiredFields := False;
    Query.Options.DefaultValues := False;
    Query.Options.ExtendedFieldsInfo := True;
    Query.Options.StrictUpdate := True;
    Query.Options.TrimFixedChar := True;
    Query.Options.LongStrings := True;
And I see problems with the readonly flag in queries that include '*' and don't include ROWID.

Code: Select all

CREATE TABLE EDIT_TEST (
	ID   NUMBER(38) PRIMARY KEY,
	TXT  VARCHAR2(4000));
INSERT INTO EDIT_TEST VALUES (1, 'TESTING_1');
INSERT INTO EDIT_TEST VALUES (2, 'TESTING_2');
INSERT INTO EDIT_TEST VALUES (3, 'TESTING_3');
COMMIT;

SELECT ID + 100 "RO", ID, TXT FROM EDIT_TEST;
The first field is correctly marked as readonly.

SELECT ID + 100 "RO", ET.* FROM EDIT_TEST ET;
The first field is not marked as readonly.
This is just one example of the problem and I don't quite understand what is going on because if you use SYSDATE as the first field in the above examples they will both be properly marked readonly. Shouldn't it just be checking the updatetable's field names and setting any field that doesn't match read only? Alternately, could you surface a function that we could call to set any fields that don't match the update table's columns as read only?

Thanks for any help!

-Mark

Posted: Wed 08 Aug 2007 07:31
by Plash
We have fixed the problem. The fix will be included in the next build of ODAC.

Yes, ODAC finds the fields from updating table and sets read-only flag for all other fields. But there was a bug in detecting what fields belong to updating table.

Posted: Wed 08 Aug 2007 12:55
by MarkF
Fantastic, thanks for fixing that! Would it be possible to get a source code fix via email? Unless of course the new release is happening this week. It would be greatly appreciated.

-Mark Ford

Posted: Wed 08 Aug 2007 13:21
by Plash
We have sent the fix to your e-mail.

Posted: Wed 08 Aug 2007 14:43
by MarkF
Thank you! The fix seems to work perfectly.

-Mark

Posted: Thu 09 Aug 2007 06:40
by Vigi
Great deal. Could you please send the source fix via email to me too?

It's urgent!

Posted: Thu 09 Aug 2007 07:17
by Plash
Vigi wrote:Great deal. Could you please send the source fix via email to me too?
We have sent the fix to your e-mail.

Posted: Wed 22 Aug 2007 03:31
by nekra
I have the same bug.
Could you please send the source fix via email to me too?

Posted: Wed 22 Aug 2007 08:38
by Plash
Please contact us by e-mail odac*crlab*com and specify your licence number, ODAC edition and Delphi version.