18.01.2015 Views

Technical Reference Manual - InduSoft

Technical Reference Manual - InduSoft

Technical Reference Manual - InduSoft

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Appendix: Built-in Scripting Language<br />

Syntax<br />

SyncEvent( optStrStartDate, optStrEndDate )<br />

optStrStartDate<br />

optStrEndDate<br />

String with the start date. If this parameter is not specified, then the current date is used.<br />

String with the end date. If this parameter is not specified, then the function uses the same as<br />

the start date.<br />

Returned value<br />

Value<br />

Description<br />

1 Fail to start synchronization; the database is probably being synchronized.<br />

0 Success<br />

-1 Invalid group number<br />

-2 The format is not set to "Database".<br />

-4 Start date specified is invalid.<br />

-5 End date specified is invalid.<br />

-6 Start date is greater than the end date.<br />

Notes<br />

This function is executed asynchronously, so it doesn't return the result of the synchronization. To get that<br />

information, use the SyncEventStatus function.<br />

Examples<br />

Tag Name<br />

Tag<br />

Expression<br />

SyncEvent() // Synchronizes the database using the current date<br />

Tag SyncEvent("10/20/2004") // Synchronizes the database only for the day 10/20/2004<br />

Tag SyncEvent("10/20/2004", "10/28/2004") // Synchronizes the database from 10/20/2004 to 10/28/2004<br />

SyncEventStatus<br />

Returns the status of a previously called SyncEvent function.<br />

Function Group Execution Windows Embedded Thin Client<br />

SyncEventStatusDatabase/ERP Synchronous Supported Supported Executed on Server<br />

Syntax<br />

SyncEventStatus()<br />

This function takes no parameters.<br />

Returned value<br />

Value<br />

Description<br />

3 Synchronization has finished.<br />

2 Fail synchronizing<br />

<strong>InduSoft</strong> Web Studio Page 755

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!