Data Access Worldwide Knowledge Base
Article ID 2085 Article Title INFO: Differences between the Read and Find Messages Article URL http://www.dataaccess.com/kbasepublic/kbprint.asp?ArticleID=2085 KBase Category VDF (GENERAL) Date Created 02/14/2005 Last Edit Date 02/16/2005
Article Text
QUESTION:
What is the difference between the DataDictionary Read and Find messages?
ANSWER:
The read and find messages are different. They perform an identical find and will return FOUND the same way. The difference is the effect they have on the DD.
The read messages do not change anything in the DD. The DD does not latch on to the new record. CurrentRowId (current_record) and the buffer values do not change. So you use the read messages when you want to find a record using DD finding logic (constraints, custom relates, etc) but you do not want the DD to get changed. For example: a dbGrid needs to find a record for each row but it only updates the DD one time with the current record. So the grid uses reads to fill itself and uses find to latch on to the current record.
The find messages are:
find, request_find, findByrowId, find_by_recnum
The read messagas are:
Request_read, ReadByrowId, Read_by_recnum, locate_next
Request_Assign can be used to take a record that was "read" and latch it to a DDO.
NOTE:
Next_Record should only be used when the direction has been established usually with first_record or last_record.
Contributed By:
John Tuohy
Company: Data Access Worldwide
Web Site: http://www.dataaccess.com
Email this Article
Email this Article to a Colleague
Send Feedback on this Article to Data Access Worldwide
Copyright ©2010 Data Access Corporation. All rights reserved.
The information provided in the Data Access Technical Knowledge Base is provided "as is" without warranty of any kind. Data Access Corporation disclaims all warranties, either express or implied, including the warranties of merchantability and fitness for a particular purpose. In no event shall Data Access Corporation or its suppliers be liable for any damages whatsoever including direct, indirect, incidental, consequential, loss of business profits or special damages, even if Data Access Corporation or its suppliers have been advised of the possibility of such damages. Some states do not allow the exclusion or limitation of liability for consequential or incidental damages so the foregoing limitation may not apply.