main logo
Subject: [VJDK 1.8.8] A puzzler
Author: Scott Steinman
Posted: 2001/05/30 00:20:03
 
View Entire Thread
New Search


--
This short code segment is pretty simple. It should start with the
first record of a BaseObject called ScoreDxDB (it's used to score the
diagnoses of a patient by a student), then loop through the diagnosis
records until no more records are present:

try
{
getScoreDxDB().FirstRecord();

long numRecs = getScoreDxDB().GetRecordCount(); //
Confirms that 10 records are present

do
{

long recID = getScoreDxDB().GetRecID(); // Which
record are we working on?

// ALL FOLLOWING CODE ONLY READS FIELDS

if ( isIcd9Defined(
getScoreDxDB().getIcd9() ) ) // Is student's Icd9 field > 0?
{
float userIcd9 = getScoreDxDB().getIcd9();
// Use student's Icd9 code

if ( isMatchWithExpert( userIcd9 ) ) //
Does it match expert's Icd9 code?
{
// all code here commented out during testing
}
else
{
// all code here commented out during testing
}
}

} while ( getScoreDxDB().NextRecord() );
}
catch ( VException vx )
{
....
}

The strange thing: the record pointer never gets moved past the first
iteration of the loop!! The variable recID stays stuck at 2 and the
loop never exits. Am I just missing something blatently obvious here?
I've used this same program logic elsewhere and it's worked just
fine. It's just this particular loop that fails.

I'd appreciate any help that's offered.

Dr. Scott Steinman
steinman (AT) sco .DOT edu

-------------------------------------------------------------
The Valentina mailing list is brought to you by MacServe.net
For info on lists services, see http://www.macserve.net/lists.html
 
©2001 Scott Steinman
<-- Prior Message New Search Next Message -->