0

truncating a table

how does one delete all records from a table at once?

7 replies

null
    • Nick
    • 3 yrs ago
    • Reported - view

    Right-click on the left (numeric) column and select Select All.

    Then right-click again and select Delete Selected.

    • Mel_Charles
    • 3 yrs ago
    • Reported - view

    Amanda

    Be carefull tho - cos once the data is gone it's really gone !

    suggest you do a backup first !!!

    • Amanda_RedmondNeal
    • 3 yrs ago
    • Reported - view

    Thanks, Nick. You must be offering instructions of how to do this in Ninox's browser interface, using a PC. Unfortunately they don't help me because I am using Ninox on an iPhone, where there is no way to right-click on the primary key column. Either a tap or a long press on the header of that column reveals a handful of options, but none of them are "select all".

     

    I actually attempted to sync my database from the iPhone to the web interface last night in order to employ the steps you suggest (having learned of them through the online help). But I was thwarted in that regard too as I could not figure out how to initiate synchronization. Do you have advice about that?

    • Nick
    • 3 yrs ago
    • Reported - view

    Hi Amanda,

    another way is to create a button in your form with this code:

    ---

    let d := dialog("Attention", "I will delete ALL records! Are you sure? ", ["Delete", "Cancel"]);
    if d = "Delete" then
    delete (select TableName)
    end

    ---

    Change TableName with your table name.

    Again, be careful, if you press Delete you will lose all records in your table.

     

    To sync with the web app, from the database list in your iPhone:

    - In your phone Swap your database name to the right to unveil the menu

    - Save archive as -> Store on iCloud Drive

    - Open to the web app and choose Import Archive and select the database from the iCloud Drive.

    • Nick
    • 3 yrs ago
    • Reported - view

    If you don't want the dialog, simply use this code:

    delete (select TableName)

    • Amanda_RedmondNeal
    • 3 yrs ago
    • Reported - view

    Thanks again, Nick. I was able to upload the database so that it was available from the Ninox web app. Then truncated the table as desired. But the changes are not visible from the iPhone. It appears the steps you walked me through was a simple export-then-import process. Isn't actual synchronization possible between the iPhone and web app? I need the same version of the database to be accessible from both interfaces.

    • Nick
    • 3 yrs ago
    • Reported - view

    Hi Amanda, sorry, I thought it was clear!

    While on the mobile, tap on the user icon in the upper right corner and login to your Ninox account.

    At the top left you can move between iCloud (My Databases) and Ninox Cloud (the name of the team you created).

     

    You cannot sync between iCloud and Ninox cloud.

Content aside

  • 3 yrs agoLast active
  • 7Replies
  • 617Views