------------------------SDT2ÿÿÿÿMainCardExists----------------------------------------------------ObjectName----------------------------------------ObjectType----------------------------------------!%()HeaderText------------------------------------!%()HeadingText----------------------------------- ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿMainCardExists-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ÿÿÿÿ6--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ÿÿÿÿ()[8(! ; RETURNS Boolean;)]}n;)]}-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------*ÿÿÿÿ()[8(!# EXPORTED PROCEDURE MainCardExists)]}-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------9ÿÿÿÿ()[w(!GSDL)]}-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ÿÿÿÿ!%()HeaderText------------------------------------!%()HeadingText-----------------------------------!%()PageOrder-------------------------------------1-------------------------------------------------  ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ!%&()LinkEndpoints----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- ------------------------------------ÿÿÿÿ()[(! l¸ ! ú–!(d)[h(! l¸ )[k(! 6)[n(! 6d! )]][ q(! 6)][&‰(! 6 ú! Èd!S)[8(! ) (!4!5!7)[!(! 1!!3)]}--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------Pÿÿÿÿ][¿(!„^„¼!"„¼„^)[6¤(! 62¼! ¤–!S)[8(!T retcode := SQLBindCol(hstmt, 1, #code('SQL_C_SLONG'), #code('(void *)&#(PINCode)'), 0, #code('&#(CodeNbrInd)')) , retcode := SQLBindCol(hstmt, 2, #code('SQL_C_SLONG'), #code('(void *)&#(CardId)'), 0, #code('&#(CardNbrInd)')), retcode := SQLBindCol(hstmt, 3, #code('SQL_C_SLONG'), #code('(void *)&#(CardIndex)'), 0, #code('&#(MasterInd)')) )][§(!"„R „kRkRè!"Rè„R)[6¡(! 6dè! Ü–!S)[8(!à SQL_stmt_ptr := #code('#(SQL_stmt)'), SQL_stmt_ptr := strcpy (SQL_stmt_ptr, #code('"SELECT CardNbr, PINCode, Master FROM Ca rd_Code_table"')), retcode := SQLExecDirect (hstmt, #code('(unsigned char*)#(SQL_stmt)'), SQL_NTS) )][ª(!R~R!"RR~)[ €(! 6î! Èd!S)[8(!> (retcode = SQL_SUCCESS) OR (retcode = SQL_SUCCESS_WITH_INFO))][È(!¶FLFL@!"L@¶F)[8(! 6e_! true)][6}(! 6 @! Xd!S)[8(!B CurrentCardNbr := CurrentCardNbr + 1, retcode := SQLFetch(hstmt))][ ×(!2xr‘r‘ÃûÃûFF!"Fxr)[Ô(! 6!! !S)[8(!{ The table is not empty and therefore a maincard must exist. CurrentCardNbr is increased to set the next CardNbr to insert)]]][³(!"L¤L½~½~Ö!"~ÖL¤)[ Ë(! 6Ö! Èd!S)[8(! retcode /= SQL_NO_DATA)][Ñ(!*¼¼'L'L@!"L@)[8(! 6qY! true)][(! 6L'!)][)}()]][(!â!"â)[8(! 6-!! false)][6þ(! 6! ôd!S)[8(!" retcode := SQLCloseCursor(hstmt))][(!"fFF. !"F. f)[6Ú(! 6. ! Xd!S)[8(!& CurrentCardNbr := CurrentCardNbr - 1)][Ý(!"F’ F« x« xÄ !"xÄ F’ )[ (! 6Ä ! Èd!S)[8(! CurrentCardNbr > 0)][(!ö Šö Šð !"Šð ö )[8(! 6—Ä ! false)][(! 6Šö !´)]['­(! 6&ð ! Èd!S)[8(! false)]]][ (!Üö rö rð !"rð Üö )[8(! 6‹ ! true)]['t(! 6ð ! Èd!S)[8(! true)]]]]]]]]]]]]][°(!îFôFôl!"ôlîF)[8(! 6 _! false)][6à(! 62l! „–!S)[8(!— temp := #code('#(SQL_state)'), temp2 := #code('#(Msg)'), retcode := SQLGetDiagRec(SQL_HANDLE_STMT, hstmt, 1, temp, &NativeError, temp2, 256, &MsgLen))][ õ(!"¶·õ·õžž!"ž¶·)[ï(! 6l!! !S)[8(! Error handling)]]][ã(!"ôô&&. !"&. ô)[6ø(! 6,. ! ôd!S)[8(!" retcode := SQLCloseCursor(hstmt))][û(!"&’ &« Š« Šð !"Šð &’ )[)­()]]]]]]]]]]]]]]]}------------------------------------------------------------------------------------------------------------------------------------------------------------------------Xÿÿÿÿ