char* SdbReadDirs ( int iDirsRecNo ) { char szMYFIELD_1 [ 20 ]; strcpy ( szMYFIELD_1, "" ); // initialize the null string while ( true ) { DBIEXEC ( DbiSetToRecordNo ( hTable, iDirsRecNo ) ); if ( ErrorFlag == true ) break; DBIEXEC ( DbiGetRecord ( hTable, dbiNOLOCK, pszRecBufTable, NULL ) ); if ( ErrorFlag == true ) break; DBIEXEC ( DbiGetField ( hTable, 1, pszRecBufTable, szMYFIELD_1, NULL ) ); break; } return szC_DISK; // null string returned ? Some error occurred... }