Page 1 of 1

ODAC 6.05.0.7: Field readonly not being set?

Posted: Tue 22 May 2007 12:26
by MarkF
Hi Folks!

It looks like in 6.05.0.7 the field readonly flag is not being set. I just checked with build 6 and it looks like this issue is new in .7. For example I run a query like:

select empno, 'literal' from emp;

and field 2 is not properly set to readonly.

Thanks!

-Mark Ford

Posted: Wed 23 May 2007 07:23
by Plash
In ODAC 6.05.0.7 we have changed behaviour of TSmartQuery component for compatibility with ODAC 5. The Readonly attributes are set for fields only if the KeyFields property is not empty, or if ROWID is included in the query.

Posted: Wed 23 May 2007 17:59
by MarkF
I must admit I don't understand the need to go back to the version 5 behavior. If someone doesn't want the readonly flag set for them automatically, can't they just use the SetReadOnlyFlags property to turn it off?

I've tried setting keyfields and/or updatingtable (just in case) and so far it appears to me that the fields readonly flags are being set only when ROWID is included in the query.

Is there a way that the readonly flags could be set explicitly via a function call or something along those lines? I like that the SmartQuery internally handles updating table and key fields (if they aren't set explicitly) and it would be nice if this readonly stuff was handled in some way too.

Thanks for any suggestions or help!

-Mark

Posted: Thu 24 May 2007 08:51
by Plash
These changes in ODAC are required to covert an ODAC 5 based program that uses the TSmartQuery component with assigned SQLUpdate or SQLInsert properties to ODAC 6 without any changes in the application.

In the next ODAC build we'll enhance the SetFieldsReadOnly property behaviour. This property will be ignored only if the KeyFields property is empty, ROWID isn't included in the query and the SQLUpdate or SQLInsert property is not empty.

We could not reproduce the problem that the Readonly attribute is not set when the KeyFields property is not empty. If the ExtendedFieldsInfo option of your TSmartQuery component is False, the component never sets the Readonly attribute for string literals. The fix for this problem will be included in the next build of ODAC.
If you can reproduce the problem when the ExtendedFieldsInfo option is set to True and the KeyFields property is not empty, please send to odac*crlab*com a complete small sample that demonstrates the problem, including script to create server objects.

Posted: Thu 24 May 2007 14:06
by MarkF
The fix for the next build sounds great, I'm looking forward to it! I do seem to be able to reproduce the problem with ExtendedFieldsInfo set to true (which I usually don't use) and setting the keylist, but I've changed many settings related to this so I could be mistaken. I'll try to make a small example and send it in.

Thanks for your help!

-Mark