QPR Knowledge Base 2014.1

SaveServerModelAs

SaveServerModelAs

Previous topic Next topic  

SaveServerModelAs

Previous topic Next topic JavaScript is required for the print function  

Revision history:

Introduced in QPR 7.2.1

Last changed in QPR 2012.2

 

Saves a server model with a new name.

 

Synopsis:

 

PGModel.SaveServerModelAs(ServerPathName)

 

Parameters:

 

ServerPathName: String. New path and name under which the model is saved in the server.

 

Required Rights:

 

Administrator in the case existing models are overwritten.

 

Return Values:

Below are listed the return values that this function can return:

 

RV_SUCCESS

RV_APPLICATION_QUIT_CALLED

RV_MODEL_NOT_OPEN

RV_UNKNOWN_ERROR

RV_CANNOT_SAVE_MODEL

RV_INVALID_MODEL_PATH

RV_ONLY_ADMINISTRATORS_CAN_OVERWRITE_SERVER_MODELS

RV_MODEL_IS_RESERVED

RV_FAILED_LOADING_EMBEDDED_DOCUMENTS_FROM_SERVER

RV_FUNCTION_CANNOT_BE_USED_IN_VALIDATION_SCRIPT

 

Example Procedure:

 

Sub SaveModelAs

 iResult = oModel.SaveServerModelAs("\\NewModel")

 If (iResult <> 0) Then

   MsgBox "Saving model with a new name failed: " + PGApplication.GetErrorMessage(iResult)

 End If

End Sub