SyncEvent
- Last UpdatedAug 07, 2026
- 1 minute read
Synchronizes the event database.
|
Function |
Group |
Execution |
String Exp. |
Windows |
Windows Embedded |
IoT View |
Thin Clients |
Mobile Access |
|---|---|---|---|---|---|---|---|---|
|
SyncEvent |
Database/ERP |
Asynchronous |
No |
Supported |
Supported |
Not supported |
Executed on Server |
Executed on Server |
Syntax
SyncEvent( optStrStartDate, optStrEndDate )
optStrStartDate
The start date, formatted according to the current date format on the project runtime server. For more information, see About the date format and how to change it.
This parameter is optional; if no value is specified, the current date is used by default.
optStrEndDate
The end date, formatted according to the current date format on the project runtime server. For more information, see About the date format and how to change it.
This parameter is optional; if no value is specified, the start date is used by default.
Returned value
|
Value |
Description |
|---|---|
|
1 |
Fail to start synchronization; the database is probably being synchronized. |
|
0 |
Success |
|
-1 |
Invalid group number |
|
-2 |
The format is not set to "Database". |
|
-4 |
Start date specified is invalid. |
|
-5 |
End date specified is invalid. |
|
-6 |
Start date is greater than the end date. |
Notes
This function is executed asynchronously, so it doesn't return the result of the synchronization. To get that information, use the SyncEventStatus function.
Examples
|
Tag Name |
Expression |
|---|---|
|
Tag |
SyncEvent() // Synchronizes the database using the current date |
|
Tag |
SyncEvent("10/20/2004") // Synchronizes the database only for the day 10/20/2004 |
|
Tag |
SyncEvent("10/20/2004", "10/28/2004") // Synchronizes the database from 10/20/2004 to 10/28/2004 |