EsbRenameDatabase

Description

EsbRenameDatabase() renames an existing database within an application, either on the client or the server. If the database is running on the server, it is first stopped.

Syntax
EsbRenameDatabase (hCtx, AppName, DbName, nDbName)
ByVal hCtx    As Long
ByVal AppName As String
ByVal DbName  As String
ByVal nDbName As String

Parameters

hCtxEssbase VB API context handle. Can be local context handle returned from EsbCreateLocalContext().
AppNameApplication name.
DbNameName of an existing database to rename.
nDbNameNew name of the database.

Return Value

None.

Notes

Access

For a server database, the caller must have Database Create/Delete/Edit privilege (ESB_PRIV_DBCREATE).

Example

Declare Function EsbRenameDatabase Lib "ESBAPIW" (ByVal hCtx As Long, ByVal AppName As String, ByVal OldName As String, ByVal NewName As String) As Long 

Sub ESB_RenameDatabase ()
   Dim sts As Long
   Dim AppName As String
   Dim OldName As String
   Dim NewName As String 

   AppName = "Sample"
   OldName = "Basic"
   NewName = "NewBasic"

   '****************
   ' Rename database
   '****************
   sts = EsbRenameDatabase (hCtx, AppName,
         OldName, NewName)
End Sub 

See Also

EsbRenameApplication()
EsbRenameObject()