EsbCopyObject() copies an object on the server or client object system.
EsbCopyObject (hCtx, hDestCtx, ObjType, AppName, nAppName, DbName, nDbName, objName, nobjName)
ByVal hCtx As Long ByVal hDestCtx As Long ByVal ObjType As Long ByVal AppName As String ByVal nAppName As String ByVal DbName As String ByVal nDbName As String ByVal objName As String ByVal nObjName As String
hCtx | Essbase VB API context handle for source object. Can be local context handle returned by EsbCreateLocalContext(). |
hDestCtx | Essbase VB API context handle for destination object. |
ObjType | Object type (must be single type). Refer to Bitmask Data Types for a list of possible values. |
AppName | Source application name. |
nAppName | Destination application name. |
DbName | Source database name. If an empty string, uses the source application sub-directory. |
nDbName | Destination database name. If an empty string, uses the destination application sub-directory. |
objName | Name of a source object to copy from. |
nobjName | Name of a destination object to copy to. Object names can be 8 characters long, and can contain all special characters allowed in DOS file names. No spaces, commas, backslashes, or periods are allowed. |
Declare Function EsbCopyObject Lib "ESBAPIW" (ByVal hCtx As Long, ByVal hDestCtx As Long, ByVal ObjType As Integer, ByVal SrcApp As String, ByVal DestApp As String, ByVal SrcDb As String, ByVal DestDb As String, ByVal SrcObj As String, ByVal DestName As String) As Long Sub ESB_CopyObject () Dim sts As Long Dim hDestCtx As Long Dim SrcApp As String Dim SrcDb As String Dim SrcObj As String Dim DestApp As String Dim DestDb As String Dim DestObj As String Dim ObjType As Integer hDestCtx = hCtx SrcApp = "Sample" SrcDb = "Basic" SrcObj = "Basic" DestApp = "NewSamp" DestDb = "NewBasic" DestObj = "NewBasic" ObjType = ESB_OBJTYPE_RULES '****************** ' Copy rules object '****************** sts = EsbCopyObject (hCtx, hDestCtx, ObjType, SrcApp, DestApp, SrcDb, DestDb, SrcObj, DestObj) End SubEsbCreateObject()