Start uploading data in batches. For example, if you call this function before uploading data such as user templates and user information, the SDK stores the data temporarily in the buffer during upload. Then, you can run BatchUpdate to import temporary data into the device.
Device number
Fingerprint overwrite flag, that is, when a user fingerprint template is uploaded, if the fingerprint index has been specified for an existing fingerprint, the device prompts whether to overwrite the existing fingerprint template. 1: Forcibly overwrite, 0: Not overwrite
Return True if it is successful, or return False.
BatchUpdate, CancelBatchUpdate
private int batchUpdate(string ipAddr, int port) { int iMachineNumber = 1; int iUpdateFlag = 1; int idwErrorCode = 0; //Create Standalone SDK class dynamicly. zkemkeeper.CZKEMClass axCZKEM1 = new zkemkeeper.CZKEMClass(); if (axCZKEM1.Connect_Net(ipAddr, 4370)) { axCZKEM1.EnableDevice(iMachineNumber, false); if (axCZKEM1.BeginBatchUpdate(iMachineNumber, iUpdateFlag))//create memory space for batching data { //perform batch operations (multiple axCZKEM1.SSR_SetUserInfo, axCZKEM1.SetUserTmpExStr) } axCZKEM1.BatchUpdate(iMachineNumber);//upload all the information in the memory axCZKEM1.RefreshData(iMachineNumber);//the data in the device should be refreshed axCZKEM1.EnableDevice(iMachineNumber, true); MessageBox.Show("Operation Success!"); } else { axCZKEM1.GetLastError(ref idwErrorCode); } axCZKEM1.Disconnect(); return idwErrorCode; }
Private Sub batchUpdate(ipAddr As String, port As Int32) 'Create Standalone SDK class dynamicly. Dim axCZKEM1 As New zkemkeeper.CZKEM Dim iMachineNumber As Integer Dim idwErrorCode As Integer Dim iUpdateFlag As Integer = 1 If axCZKEM1.Connect_Net(ipAddr, port) = True Then axCZKEM1.EnableDevice(iMachineNumber, False) If axCZKEM1.BeginBatchUpdate(iMachineNumber, iUpdateFlag) Then 'create memory space for batching data 'perform batch operations (multiple axCZKEM1.SSR_SetUserInfo, axCZKEM1.SetUserTmpExStr) End If axCZKEM1.BatchUpdate(iMachineNumber) 'upload all the information in the memory axCZKEM1.RefreshData(iMachineNumber) 'the data in the device should be refreshed axCZKEM1.EnableDevice(iMachineNumber, True) MsgBox("Operation Success!") Else axCZKEM1.GetLastError(idwErrorCode) End If axCZKEM1.Disconnect() End Sub