NID colShipments[] = {NID_SHPN};
struct
{
MATH_NUMERIC mnShipmentNumber;
} recShipment={0};
...
if(JDB_OpenTable(hUser, NID_F4941, (ID)0, colShipments,
(ushort)DIM(colShipments), (JCHAR *)NULL, &hReqShipment) != JDEDB_PASSED
|| JDB_SetSelectionX(hReqShipment, select, nSelIdx, JDEDB_SET_REPLACE) != JDEDB_PASSED
|| JDB_SelectKeyedDistinct(hReqShipment, (ID)0, (void *)NULL, (short)0) != JDEDB_PASSED)
{
idReturn = acmeErrorSetTableOpen(lpBhvrCom, lpVoid, (ID)0, NID_F4941);
goto FunctionCleanUp;
}
while(JDB_Fetch(hReqShipment, &recShipment, 0) == JDEDB_PASSED)
{
... do stuff ...
}