Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi want to record metadata of QVD load into a QVD file. For this every QVD builder app should run this script first.
If File exists, then do nothing. Else create the file.
I am using following code, but every time it overwrites with blank data.
Set vFilePath = 'C:\QVD_Files\Metadata.QVD' ;
IF FileSize($(vFilePath)) > 0 THEN // Do Nothing
ELSE // Create the following QVD
MetaData:
LOAD * INLINE
[
TableName, RowCount, FieldCount, LoadDateStamp
];
STORE MetaData into $(vFilePath )(qvd);
DROP TABLE MetaData;
END IF
Am I writing the if statement incorrectly? If so, then what would be the best way to write it. Thank you
A tiny adjustment will solve your issue. Change marked in blue,
IF FileSize('$(vFilePath)') > 0 THEN
Trace Do Nothing;
ELSE
Trace Create the following QVD;
MetaData:
LOAD * INLINE
[
TableName, RowCount, FieldCount, LoadDateStamp
];
STORE MetaData into $(vFilePath)(qvd);
DROP TABLE MetaData;
END IF
A tiny adjustment will solve your issue. Change marked in blue,
IF FileSize('$(vFilePath)') > 0 THEN
Trace Do Nothing;
ELSE
Trace Create the following QVD;
MetaData:
LOAD * INLINE
[
TableName, RowCount, FieldCount, LoadDateStamp
];
STORE MetaData into $(vFilePath)(qvd);
DROP TABLE MetaData;
END IF
Thanks Vegar 🙂 power of code review 😁