Thursday, November 7, 2024

record insert list

 





class testRecordInsertList

{

    public static void main(Args _args)

    {

        ProjInvoiceJour projInvoiceJour;

        RecordInsertList myTableTmpList;

        MyTable myTable;


        // Initiating the list with temp table buffer

        myTableTmpList = new RecordInsertList(tableNum(MyTable), false, false, false, false, false, myTable);


        while select InvoiceDate, InvoiceId from projInvoiceJour

            where projInvoiceJour.InvoiceDate >= _fromdate

               && projInvoiceJour.InvoiceDate <= _todate

        {

            myTable.InvDate = projInvoiceJour.InvoiceDate;

            myTable.Invoice = projInvoiceJour.InvoiceId;

            myTableTmpList.add(myTable);

        }

        myTableTmpList.insertDatabase();

    }

}