Data Access Worldwide Knowledge Base
Article ID 2092 Article Title INFO: Find_by_Recnum Article URL http://www.dataaccess.com/kbasepublic/KBPrint.asp?ArticleID=2092 KBase Category VDF11 Date Created 03/03/2005 Last Edit Date 03/03/2005
Article Text
PROBLEM:
Embedded database.
I have a view with a DD-aware field. In the DDO of the view I augumented find_by_recnum:
PROCEDURE find_by_recnum INTEGER file_number INTEGER rec_number
FORWARD SEND find_by_recnum file_number rec_number
SEND doMyStuff
END_PROCEDURE // find_by_recnum
From the dbForm I use the prompt to select a record. When selected in 10.1, this message (find_by_recnum) gets called but in 11.0 it does not get called.
In VDF11.0 in selst_ds.pkg in move_value_out "Send FindByRowId of Srvrobj# iFile riRec" is sent.
In VDF10.1 "Send Find_by_Recnum to Srvrobj# MainFile rec#" is sent.
So, it looks like FindByRowID does not send find_by_recnum. Find_By_Recnum is marked absolete as it can only be used with recnum tables. Shouldn't find_by_recnum work as in 10.1?
SOLUTION:
Find_by_recnum does work if it gets called. What you've got is a problem where a method that used to call find_by_recnum now calls another method, FindByRowId, to accomplish the same thing. The fact that the private method move_value_out calls find_by_Recnum was considered to be implementation detail.
However, I can see how this causes you a problem. There are two ways we can resolve this:
1. We can change Move_Value_Out so that it checks to see what kind of table the server is using and send either find_by_recnum or ReadByRowId.
I really don't like this solution as it adds a bunch of legacy code and creates inconsistencies in the behavior. For example, if you ever moved to a non-recnum table, your code would stop working. This the advantage that it is no extra work for you (at least short term - long term this may cause problems).
2. You could change you code to augment FindByRowId instead of Find_by_Recnum.
This is the best solution.
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.