Icon View Thread

The following is the text of the current message along with any replies.
Messages 1 to 5 of 5 total
Thread reuse of table component caused a findkey problem
Wed, Apr 19 2006 9:50 AMPermanent Link

Nick Howell
I've been scratching my head on this one.  I was doing a quickie app to merge table info from an external
application into a master table set (transcriptions of scanned copies of survey comments).  Two table types are
involved, one for concepts coding & one for transcribed text.  I had placed 2 table components on the form
with the intention of using one for the master & one for the update input. The app would,  first,  assign
tablenames, indexnames & merge in the concepts file data then, subsequently, change the component
properties to point to the master & update files tables for the transcribed text tables and merge that data in.

The problem is that after assigning the component properties for the transcribed text filenames & indexnames,
record lookups would not work.  I had code in place to edit records if data had already been entered and to
append records if it was a new case number (in case someone kept using the same table set instead of
starting with an empty table for a new location).  Following testing, it became evident that all input was being
appended, even if the case number was already present.  I tried both Setkey & Findkey approaches & both
failed.   Adding 2 new table components to the form & using their names in the second section (instead of re-
using the original 2)  fixed the problem,  but I am really curious as to why the failure occured in the first
place.  

In setting up for the transcribed text tables, the sequence used was : set Active to false; change tablename;
set active to true; change indexname.  No errors occured, records appended OK, but  index based lookups
didn't work.   I have re-used table components many times in the past without incident.  Anyone have any
insight into a possible mechanism for this occurance?  I am drawing a blank myself ...

FWIW, I was using  4.22b3

Nick
Wed, Apr 19 2006 10:39 AMPermanent Link

Roy Lambert

NLH Associates

Team Elevate Team Elevate

Nick


Persistent fields?

Roy Lambert
Wed, Apr 19 2006 10:58 AMPermanent Link

Nick Howell
No.  Very plain vanilla.  Drop the component, specify database & tablename & fire away.  

Out of habit, I do have a Session component on the form with autosession enabled...

Nick

Roy Lambert <roy.lambert@skynet.co.uk> wrote:

Nick


Persistent fields?

Roy Lambert
Wed, Apr 19 2006 11:06 AMPermanent Link

Nick Howell
oops ... sorry, may have missed your point .    All field references are "fieldbyname".

Nick


Roy Lambert <roy.lambert@skynet.co.uk> wrote:

Nick


Persistent fields?

Roy Lambert
Wed, Apr 19 2006 11:24 AMPermanent Link

Roy Lambert

NLH Associates

Team Elevate Team Elevate

Nick


Sorry the point was that if you define persistent fields in the IDE and then try and find a record using a field that isn't in that list it won't work. But now I think about it some more I think it usually throws a field not found error rather than just doesn't find it.

Roy Lambert
Image