Qlik Community

QlikView Publisher

Discussion Board for collaboration on QlikView Publisher.

Announcements
QlikView Fans! We’d love to hear from you.
Share your QlikView feedback with the product team… Click here to participate in our 5-minute survey.
Rules, plus terms and conditions, can be found here.
udaya_kumar
Valued Contributor

Problem executing VBScript with database connection in QMC

Hi,

I have written a VB Script which connects to database and uses the select query and gets some status flag.

Using that flag, am checking that condition in the VB Script and archiving the previous qvw file.

so i have given that vb script path in the Supporting task->External Program-> VB Script task.

I have given the BAT file which calls the VB Script.

If i run the BAT file directly, then it works perfectly, but if i run the task in the server, then its showing running, but the archival is not happening.

Is it because of database connectivity in VB Script, which is making it not to archive?

can anyone help me?

Tags (2)
3 Replies

Problem executing VBScript with database connection in QMC

Can you write some log messages out of your script so you can determine what is happening?

-Rob

udaya_kumar
Valued Contributor

Problem executing VBScript with database connection in QMC

Hi Rob,

This is the details in the log file

(2012-06-05 14:01:25) Information: Starting task'MARA_ARCHIVE_SCRIPT'. Id:4d2d8042-2504-47da-803d-300d480c391c. Triggered by'ManualStartTrigger'. Id:00000001-0002-0003-0405-0607080a0b0c

(2012-06-05 14:01:25) Information: Entering TaskExecution.

(2012-06-05 14:01:25) Information: ClusterID=1

(2012-06-05 14:01:25) Information:QDSID=a9bc0df3-80ed-5137-c0ef-67a390a017ed

(2012-06-05 14:01:25) Information:TaskID=4d2d8042-2504-47da-803d-300d480c391c

(2012-06-05 14:01:25) Information:MaxRunTime=1.00:00:00

(2012-06-05 14:01:25) Information:MachineName=WA00488D

(2012-06-05 14:01:25) Information: Max attempts:1

(2012-06-05 14:01:25) Information: Current Attempt=0

(2012-06-05 14:01:25) Information: Task Dependenciesare OK

(2012-06-05 14:01:25) Information: Executing "\\Servername\Current\RunVBScript.bat"

(2012-06-05 14:01:25) Information: Executing commandline:"

\\Servername\Current\RunVBScript.bat

" in folder"

\\Servername\Current".

(2012-06-05 14:01:28) Information: Process exitedwith exit code: 0 at 6/5/2012 2:01:28 PM

(2012-06-05 14:01:28) Information: Process exitedwith exit code: 0 at 6/5/2012 2:01:28 PM

(2012-06-05 14:01:28) Information: Task Execute Duration=00:00:02.9173496

(2012-06-05 14:01:28) Information: The task"MARA_ARCHIVE_SCRIPT" finished successfully

(2012-06-05 14:01:28) Information:TaskResult.status=Finished

(2012-06-05 14:01:28) Information: Notifying alltriggers of new state:Finished

(2012-06-05 14:01:28) Information: Notifying alltriggers of new state:Finished - completed

(2012-06-05 14:01:28) Information: Saving TaskResult

It shows its executed successfully, but its not archiving

Problem executing VBScript with database connection in QMC

Looks like you'll need to write some log messages out of the VbScript itself. I thnk you can do this with

Wscript.Echo("mymessage")

and redirect the stdout to a file by executng your bat with redirection like:

RunVBScript.bat > c:\temp\logfile.txt

-Rob

Community Browser