FSN#29184 gen_export werkte niet goed als geen export-view gedefinieerd

svn path=/Website/branches/v5.4.1/; revision=21123
This commit is contained in:
Jos Groot Lipman
2014-03-25 13:59:38 +00:00
parent 18a3a3e53d
commit bfe131a6d9
2 changed files with 12 additions and 7 deletions

View File

@@ -136,7 +136,7 @@ function postExport(ini)
oRs.Close();
}
// Lever null op als er geen select-view is gedefinieerd.
function exportToStream(params, exportFile)
{
var fstr;
@@ -148,7 +148,9 @@ function exportToStream(params, exportFile)
var oRs = Oracle.Execute(sql);
if (oRs.Eof)
{
__Log("Export view not found: " + exportView);
__Log("Optional export view not found: " + exportView);
oRs.Close()
return null;
}
else
{

View File

@@ -62,12 +62,15 @@
{
preExport(ini);
var streamData = exportToStream(ini, exportFile);
if (ini.compress)
expPath.destination += '.zip';
__Log("Writing: " + expPath.destination + " (" + streamData.Size + " bytes)");
if (streamData)
{
if (ini.compress)
expPath.destination += '.zip';
__Log("Writing: " + expPath.destination + " (" + streamData.Size + " bytes)");
streamData.SaveToFile(expPath.destination, streamParams.streamwrite);
streamData.Close();
streamData.SaveToFile(expPath.destination, streamParams.streamwrite);
streamData.Close();
}
postExport(ini);
}
else