DELETEALL on several tables

vf_elyvf_ely Member Posts: 5
Good afternoon.

I have a list of table numbers. I want to perform a DELETEALL on all the listed tables.
How could i do that ?
Of course, i could do that manually. But i need to flush the content of 59 tables, more than once. That's why i want to automate the process.

Thanks in advance.

Comments

  • matteo_montanarimatteo_montanari Member Posts: 189
    vf_ely wrote:
    Good afternoon.

    I have a list of table numbers. I want to perform a DELETEALL on all the listed tables.
    How could i do that ?
    Of course, i could do that manually. But i need to flush the content of 59 tables, more than once. That's why i want to automate the process.

    Thanks in advance.

    Hi

    Available 3.70 or newer:

    VAR
    Recordref type "recordref"
    TABLEID type integer

    Recordref.OPEN(TABLEID);
    Recordref.DELETEALL;

    You can use this inside a loop or a "Repeat-until Next=0" of a table.

    Bye

    Matteo
    Reno Sistemi Navision Developer
  • matttraxmatttrax Member Posts: 2,309
    Yep, you can set filters on the Object table, loop through it, and use RecRef
  • garakgarak Member Posts: 3,263
    http://mibuso.com/dlinfo.asp?FileID=580

    this could also help (never tested)
    Do you make it right, it works too!
Sign In or Register to comment.