lundi 10 octobre 2011

How to limit inserting records in a table

Here is an example of a method in a form for limiting the number of records to 12 :

void Query_cntRecords()
{
    Query                query = new Query();
    QueryRun             queryRun;
    QueryBuildDataSource qbd;
    ;

    qbd = query.addDataSource(tablenum(Thy_InventSymbolsIcons));
    queryRun = new QueryRun(query);

    if (SysQuery::countTotal(queryRun) == 13)
    {
        info(strfmt("@THY83"));
    }
}

Aucun commentaire:

Enregistrer un commentaire