QPR Knowledge Base 2017.1

SaveServerModelAs

SaveServerModelAs

Previous topic Next topic No directory for this topic  

SaveServerModelAs

Previous topic Next topic Topic directory requires JavaScript Mail us feedback on this topic!  

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