EsbCopyDatabase() copies an existing database, either on the client or the server, to a new database, including all associated databases and objects. If the database is copied on the server, the new database is started.
EsbCopyDatabase (hCtx, hSrcCtx, AppName, nAppName, DbName, nDbName)
ByVal hCtx As Long ByVal hSrcCtx As Long ByVal AppName As String ByVal nAppName As String ByVal DbName As String ByVal nDbName As String
hCtx | Essbase VB API context handle. |
hSrcCtx | Not used - should be same as hCtx. |
AppName | Name of a source application. |
nAppName | Name of a destination application. |
DbName | Name of an existing database to copy. |
nDbName | Name of a new database. |
Declare Function EsbCopyDatabase Lib "ESBAPIW" (ByVal hCtx As Long, ByVal hSrcCtx As Long, ByVal SrcApp As String, ByVal DestApp As String, ByVal SrcDb As String, ByVal DestDb As String) As Long Sub ESB_CopyDatabase () Dim sts As Long Dim SrcApp As String Dim DestApp As String Dim SrcDb As String Dim DestDb As String Dim hSrcCtx As Long hSrcCtx = hCtx SrcApp = "Sample" DestApp = "NewSamp" SrcDb = "Basic" DestDb = "NewBasic" '*************** ' Copy database '*************** sts = EsbCopyDatabase (hCtx, hSrcCtx, SrcApp, DestApp, SrcDb, DestDb) End SubEsbCopyApplication()