6.10.1.10: Field's readonly flag issue.

Discussion of open issues, suggestions and bugs regarding ODAC (Oracle Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
MarkF
Posts: 211
Joined: Thu 02 Mar 2006 14:55

6.10.1.10: Field's readonly flag issue.

Post by MarkF » Tue 07 Aug 2007 12:56

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

Plash
Devart Team
Posts: 2844
Joined: Wed 10 May 2006 07:09

Post by Plash » Wed 08 Aug 2007 07:31

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.

MarkF
Posts: 211
Joined: Thu 02 Mar 2006 14:55

Post by MarkF » Wed 08 Aug 2007 12:55

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

Plash
Devart Team
Posts: 2844
Joined: Wed 10 May 2006 07:09

Post by Plash » Wed 08 Aug 2007 13:21

We have sent the fix to your e-mail.

MarkF
Posts: 211
Joined: Thu 02 Mar 2006 14:55

Post by MarkF » Wed 08 Aug 2007 14:43

Thank you! The fix seems to work perfectly.

-Mark

Vigi
Posts: 10
Joined: Thu 12 Apr 2007 10:02

Post by Vigi » Thu 09 Aug 2007 06:40

Great deal. Could you please send the source fix via email to me too?

It's urgent!

Plash
Devart Team
Posts: 2844
Joined: Wed 10 May 2006 07:09

Post by Plash » Thu 09 Aug 2007 07:17

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.

nekra
Posts: 1
Joined: Sun 19 Aug 2007 15:50

Post by nekra » Wed 22 Aug 2007 03:31

I have the same bug.
Could you please send the source fix via email to me too?

Plash
Devart Team
Posts: 2844
Joined: Wed 10 May 2006 07:09

Post by Plash » Wed 22 Aug 2007 08:38

Please contact us by e-mail odac*crlab*com and specify your licence number, ODAC edition and Delphi version.

Post Reply