Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

QV 11 error while executed as ActiveX

Hello,

The QVBatch tool will produce an error at some time (after one or two execution) when it is executed with the QV 11 client.

This error (QV client APPCRASH) seems to happen after the command line execution, even if this command was successful (for instance, a reload+save). The %ERRORLEVEL% variable equals 0.

But the error is not due to the QVBatch tool, the error is reproduced with a simple Jscript file that execute a reload with QV client created as an Active X (same as the QVBatch tool written in VB Net).

var conf = {

    "path"       : "C:\\Temp\\test-1.qvw",

   

    // NO_ACCESS               = 0 ' No access/unspecified

    // ADMIN_ACCESS            = 1 ' Admin access

    // USER_ACCESS             = 2 ' User access

    // BATCH_RAW_ACCESS        = 3 ' Batch raw access

    "accessType" : 3,

    "allowDialog": false,

   

    // 0 = Default

    // 1 = Attempt recovery on all errors

    // 2 = Fail on all errors

    "reloadMode"           : 2,

    "partialReload"        : false,

    // Overrides Qlikview Script set ErrorMode

    // 0 - ignore the failure and continue script execution

    // 1 - script execution will halt and the user will be prompted for action   

    "scriptErrorMode"      : 1,

    // 0 = use default

    // 1 = suppress

    // 2 = show always

    "reloadProgressDialog" : 1,

    "save"                 : true

};

// NORMAL        = 0 ' normal (default)

// ERROR_ABANDON = 1 ' publisher : abandon on errors

// ERROR_IGNORE  = 2 ' publisher : ignore errors

var qv = new ActiveXObject("QlikTech.QlikView");

// 'Doc* OpenDocEx(BSTR _DocName, int _AccessMode, bool _AllowDialog, BSTR _UserName, BSTR _Password, BSTR _Serial, bool _NoData)

var qvDoc = qv.OpenDocEx(conf.path, conf.accessType, conf.allowDialog);

// Boolean DoReload(Integer Mode, Boolean Partial, Boolean Debug)

var isReloadSuccessful = qvDoc.DoReload(conf.reloadMode, conf.partialReload);

WScript.echo("isReloadSuccessful [" + isReloadSuccessful + "]");

// Integer ReloadEx(Integer Mode, Integer ControlProgress)

// Obsolete, but should still work

//var errorCount = qvDoc.ReloadEx(conf.scriptErrorMode, conf.reloadProgressDialog);

if(conf.save) {

    qvDoc.Save();

}

qvDoc.CloseDoc();

delete qvDoc;

qv.Quit(0);

delete qv;

There are three resource required to run the test:

  1. the reload script
  2. the Qlikview application
  3. the input source for reload

Scenario

  1. Open a command line and run the test several times with cscript tool

  2. In this case, the error showed up beggining at the third attempt (Note the delay between the event time and the execution time)

Events files with the 32 bits client

The test was run on another machine with the 64 bits client

Tests

The tests have been run on PC with Windows 7 64 bits and Windows Server 2008 R2 64 bits.

Stop the McAfee Antivirus

A test has been done on a Windows 2008 R2 server (inp245), with the McAfee services stopped, to no avail (same error).

Try 32 bits and 64 bits options

The QVBatch tools compiled to 32 bits and 64 bits were tried with the QV 11 client in 32 bits and 64 bits. The same error was present.

Any Idea ?

Best regads.

0 Replies