Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All,
I'm trying to execute multiple reload scripts from a single batch file, using the pseudo syntax
"PathToQV\QV.exe" /r "PathToReport\ReportName1.qvw"
"PathToQV\QV.exe" /r "PathToReport\ReportName2.qvw"
"PathToQV\QV.exe" /r "PathToReport\ReportName3.qvw"
I'm getting the dreaded "Encountered a Sharing Violation when accessing ..." error message. I've read in other threads that when this happens it can be fixed manually through task manager, or by executing the command line "taskkill /im qv.exe /F"
What I haven't read is how to prevent it from happening in the first place? Do I put the taskkill command at the beginning of the batch? At the end? In between each report ? All of the above?
The other threads seemed to recommend manually using Task Manager to fix this. If I have to manually clean up after the batch file, it defeats the purpose of having a batch file in the first place. So I'm hoping there's a better way.
Thanks,
John
One possibility could be that your qvw's want at the same time access the same source-files. To avoid this you could use timeout:
"PathToQV\QV.exe" /r "PathToReport\ReportName1.qvw"
timeout /T 300
"PathToQV\QV.exe" /r "PathToReport\ReportName2.qvw"
timeout /T 300
"PathToQV\QV.exe" /r "PathToReport\ReportName3.qvw"
- Marcus
Thanks Markus, but I don’t think that’s it. Each report has its own individual SQL view as a source.
Appreciate the response though.
Thanks,
John
Used you for the batch another user? There are certain security settings within the user properties beside access rights to the sql or the qvw's. Further you could try it with /l as parameter instead of /r. Also there is the possibility to use vbs as batch-file or within another qvw.
- Marcus