Starts sending an update specification to the active database. This call must be followed by successive calls to EsbSendString to send the update specification, and finally by a call to EsbEndUpdate. 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
EsbBeginUpdate (hCtx, isStore, isUpdate) ByVal hCtx As Long ByVal isStore As Integer ByVal isUpdate As Integer
Parameter | Description |
---|---|
hCtx | VB API context handle. |
isStore | Controls storage of data. If TRUE, data is stored in the server; if FALSE, no data is stored. |
isUpdate | Controls updating 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. |
Notes
This function must be followed by at least one call to EsbSendString(), followed by a call to EsbEndUpdate().
If both the Store and Unlock flags are set to FALSE, the database merely performs a syntax check of the update specification.
Return Value
None.
Access
This function requires the caller to have write privilege (ESB_PRIV_WRITE) to the active database.
Example
Declare Function EsbBeginUpdate Lib "ESBAPIN" (ByVal hCtx As Long, ByVal Store As Integer, ByVal Update As Integer) As Long Sub ESB_BeginUpdate () Dim sts As Long Dim Store As Integer Dim pUnlock As Integer Dim Query As String Query = "Year Market Scenario AcItemss Product 12345" Store = ESB_YES Unlock = ESB_NO '************* ' Begin Update '************* sts = EsbBeginUpdate (hCtx, Store, pUnlock) '************************** ' Send update specification '************************** sts = EsbSendString (hCtx, Query) '*********** ' End Update '*********** sts = EsbEndUpdate (hCtx) End Sub
See Also