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
ParameterDescription

hCtx

VB API context handle.

AppName

Name of an application to contain database.

DbName

Name of a database to create. See Database Name Limits.

DbType

Type of database to create: (ESB_DBTYPE_NORMAL/ESB_DBTYPE_CURRENCY).

Notes

Return Value

None.

Access

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

Example

Declare Function EsbCreateDatabase Lib "ESBAPIN" (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