View Fields

umayr

Member²
Hi

If u can pls helpme..

I am using Oracle 816,Win2k Pro, Delphi 5, Doa333.

I have a view from compiled from 3 tables.
Q1) How does DOA decide, which fields are 'Required' during an insert/update..

I do not explicitly define fields during designtime. I access fields using

Oraquery1.Fieldbyname('Fieldname').asxxxx

Q2) Is it better to define fields in designtime and access these fieldobjects or
using as above ie:fieldbyname....

Rgds
Shafeeu
 
By default the Required property of each field in a TOracleDataSet corresponds to the field properties that Oracle reports for the query. For a view this will correspond to the column definitions of the underlying tables. You can overrule this by making the fields persistent at design time, as this allows you to change the Required property of each field.

Your second question is difficult to answer. Your code will be cleaner and maybe faster if you have persistent fields. On the other hand, if you don't have persistent fields then often you don't have to change your application if you alter the tables (add, remove or rename columns, change a column's data type).

------------------
Marco Kalter
Allround Automations
 
Back
Top