jack786
7th July 2004, 12:07
db.retry.point()
select tiitm001.field1
from tiitm001
where ..
selectdo
message("%s",tiitm001.field2)
message("%s",tiitm001.field3)
.....

endselect

In the above code I selected only one field in the select clause
but am able to get the values of other fields also.
Why Baan is fetching other fields also when am not selecting.

rgds,
Jack

sachin03
7th July 2004, 12:35
Normally when you select a specific field from a table in the select, baan only fetches value for that field.
In your case you may have selected field2 and field3 from tiitm001 somewhere earlier in the code and in the message values selected earlier may be displayed.

JaapJD
7th July 2004, 12:50
If you specify "for update" for a table, all fields are fetched, regardless of the fields you specified in the select clause.

jack786
7th July 2004, 15:53
Why It should fetch all the fields??
can u pls explain

hklett
7th July 2004, 16:30
Because Baan doesnt support an Update of only 1 Field.

If you do a db.update() baan writes the whole record buffer back to the
table.

lbencic
7th July 2004, 17:10
This may also be related to the option on the tables to form field relations. In Maintain Tables, the "Relation Type" option tells if All Fields are related, then all fields will be locked when any field is updated. Check the help for that field - there are other options there, though not commonly used. You can specify No Relation, or define the relations yourself. This may affect what fields are read when the table is read for update. I know it affects what fields trigger a lock on other fields.