EsbCreateDatabase

Description

EsbCreateDatabase() creates a new database within an application, either on the client or the server. If the database is created on the server, it is also started.

Syntax
EsbCreateDatabase (hCtx, AppName, DbName, DbType)
ByVal hCtx    As Long
ByVal AppName As String
ByVal DbName  As String
ByVal DbType  As Integer

Parameters

hCtxEssbase VB API context handle.
AppNameName of an application to contain database.
DbNameName of a database to create.
DbTypeType of database to create: (ESB_DBTYPE_NORMAL/ESB_DBTYPE_CURRENCY).

Return Value

None.

Notes

Access

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

Example

Declare Function EsbCreateDatabase Lib "ESBAPIW" (ByVal hCtx As Long, ByVal AppName As String, ByVal DbName As String, ByVal DbType As Integer) As Long 

Sub ESB_CreateDatabase ()
   Dim sts As Long
   Dim AppName As String
   Dim DbName As String

   AppName = "Sample"
   DbName = "Basic"

   '****************
   ' Create database
   '****************
   sts = EsbCreateDatabase (hCtx, AppName, DbName,
   ESB_DBTYPE_NORMAL)
End Sub 

See Also

EsbCreateApplication()
EsbCreateObject()