4 Replies Latest reply: May 28, 2015 9:34 AM by Danny Vucinec RSS

    Remove all data from app using .NET SDK

    Danny Vucinec

      Hi, I'm trying to remove all dataconnections, script and data from an app in Sense Desktop 1.1, so it can be used as a (small) template app that only contains visualizations. This template app can then be used to create a new app with its own dataconnection and load script.


      Removing the dataconnections and script is no problem, but when I use the following method without arguments to remove the data (doesn't matter if I open the app with or without data)


      Task Qlik.Engine.IApp.RemoveAllData(bool confirm = false, AsyncHandle asyncHandle = null);


      I get this exception:


      Qlik.Engine.MethodInvocationException occurred


        Message=Internal error [LOCERR_INTERNAL_ERROR]:Internal error()



            at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)

            at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)

            at ...


      I've tried the same method on Sense Server 1.1, but I get the same exception.

      Then I tried to replace the load script by DROP TABLE; and use the following methods to reload the app with the updated script, but the data is not removed.


      Task<bool> DoReloadAsync(int mode = 0, bool partial = false, bool debug = false, AsyncHandle asyncHandle = null);


      However, when I manually reload the data, all data is removed as expected.


      Is this a bug or am I using the wrong method?