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

Avoid Overwrite of QVD

Hey everyone,

im actualy working on a freezing app for manual data added by the marketing team. Everything works fine the qvw does what is suppose to do.

The only thing i need to consider now is that if a file exist i dont want it to be overwritten by the app. Any idea's?

p.s If someone tries to overwrite a file a popup error on the up would be something appreciated

1 Solution

Accepted Solutions
Not applicable
Author

Hi,

Refer the script in this attachment.

And Run the Script through press Debug button for easy to analysis Script.

Regards,

Kabilan K.

View solution in original post

5 Replies
Not applicable
Author

Hi,

U can write script like this.

Sub Checkfile(Filename,fileExist)

     Let fileExist=0

     for each file in fileList('$(Filename)')

          fileExist=1

     exit for

End Sub

Tbl1:

Load * form Sometable;

Let isYesorNo=0;

Call Checkfile('C:\\Tbl1.qvd',isYesorNo);

If(isYesorNo=0)

store Tbl1 into 'C:\\Tbl1.qvd"

end if

hope it helps u.

Regards,

Kabilan K.

Not applicable
Author

thnx for the anserw im gonna try to implement it and will let you know

Regards

Juan Pedro

Not applicable
Author

Hi,

Refer the script in this attachment.

And Run the Script through press Debug button for easy to analysis Script.

Regards,

Kabilan K.

Not applicable
Author

Is working more than fine thanks for the tip.

One more question is possible to costumize and force a script error adding an else here?

If(isYesorNo=0) then

store Tbl1 into D:\Tbl1.qvd;

ELSE

end if

Regards

Juan Pedro

Not applicable
Author

Looks like is not possible yet to costumize a script error message.

Thnks for your time

Regards

Juan Pedro