EsbUpdateFile

Description

EsbUpdateFile() sends an update specification to the active database from a file. The update data can either be stored in the database, or just verified and any errors returned. Also, any data blocks locked for update can be unlocked by this call.

Syntax
EsbUpdateFile (hDestCtx, hSrcCtx, AppName, DbName, FileName, isStore, isUnlock)
ByVal hDestCtx As Long
ByVal hSrcCtx  As Long
ByVal AppName  As String
ByVal DbName   As String
ByVal FileName As String
ByVal isStore  As Integer
ByVal isUnlock As Integer

Parameters

hDestCtxEssbase VB API context handle of a target database on the server.
hSrcCtxEssbase VB API context handle for the update file location. The report file can reside on the client or on the same server as the target database.
AppNameApplication name for the update file location.
DbNameDatabase name for the update file location.
FileNameName of the update specification file.
isStoreControls storage of data. If TRUE, data is stored in the server; if FALSE, no data is stored.
isUnlockControls unlocking of data blocks. If TRUE, all relevant blocks which are locked will be unlocked (after data is stored, if necessary). If FALSE, no blocks are unlocked.

Return Value

None.

Notes

Access

This function requires the caller to have write privilege (ESB_PRIV_WRITE) to the active database.

Example

Declare Function EsbUpdateFile Lib "ESBAPIW" (ByVal hDestCtx As Long, ByVal hSrcCtx As Long, ByVal AppName As String, ByVal DbName As String, ByVal FileName As String, ByVal Store As Integer, ByVal Unlock As Integer) As Long

Sub ESB_UpdateFile ()
   Dim sts As Long
   Dim AppName As String
   Dim DbName As String
   Dim FileName As String
   Dim Store As Integer
   Dim pUnlock As Integer
   Dim hSrcCtx As Long

   AppName = "Sample"
   DbName = "Basic"

   '***************************************
   ' Update file is an object at the server * 
   '*************************************** 
   hSrcCtx = hCtx
   FileName = "update" 

   Store = ESB_YES
   pUnlock = ESB_NO

   '************
   ' Update File
   '************
   sts = EsbUpdateFile (hCtx, hSrcCtx, AppName,
         DbName, FileName, Store, pUnlock) 
End Sub

See Also

EsbBeginUpdate()
EsbReportFile()
EsbUpdate()