Published by K3 SYSPRO LIMITED

Other products by K3 SYSPRO LIMITED

As with much of coding there are always a myriad of ways to achieve an end result, some good, some not so good. We have found these samples useful over the years. We hope that you can use them "as is" or use them to short circuit development. Either way they should provide some interesting reading and hopefully provoke some thought.

Version: 2

The K3 Syspro VBScripting Samples Library consists of a series of scripting samples, code snippets, VBScript classes and functions, and documentation.

Originally developed to help K3 Syspro consultants maximise the VBScripting in SYSPRO (and to assist in writing scripts outside SYSPRO) they have now been made generally available to the SYSPRO community via the SYSPRO App Store.

Changes for Version 2


Classes and Functions

  1. cls_DataSwitchFunctions.vbs

    Removed method InsertDSWTransactionSQL. You should now use InsertDSWTransactionSP. This passes insert control to the server rather than execute from the client.

  2. fn_BuildXMLFromListView.vbs – new function

    Designed to be used with Syspro Custom Pane list views that have an editable column.

    The function will create an XML string for all rows that have data in the editable column

    There is a single argument ColumnToCheck. This is the column number (starting at 0 for the first column) to check to see if there is data in it. If there is then all the data for that row is included in the XML

  3. fn_format.vbs – replaced with a new version

    The old version used MSSTDFMT.dll that is no longer shipped with Windows 7 and later.

    The new version uses the .Net Framework



New Examples

  1. CallSQLStoredProcedure_GetRecordset.vbs

    How to get a record set back from a SQL stored procedure – sample SQL stored procedure in comments at the beginning of the code

  2. CallSQLStoredProcedure_GetReturnValue.vbs

    How to get a return value from a SQL stored procedure – sample SQL stored procedure in comments at the beginning of the code

  3. CallSysproWCFService.vbs

    How to call Syspro WCF service

  4. CreateZipFile.vbs

    Create a zip file and copy files to it.

  5. ListAllSQLTriggers.vbs

    Lists all SQL triggers in a database

  6. ModuleTestHarness.vbs

    Script to help test the “LoadModule” modules.


Handy Hints

  1. SYSPRO Performance V1.02.docx

    Notes on our experiences when diagnosing slow performance of Syspro or SRS

  2. SQLViews.docx

    Some notes on changing column types after creating views

  3. VBScript Event Detection

    Some notes on how to work out when Syspro fires its events

  4. VBScript examples of how to handle command line arguments.docx

    Examples of handling arguments in scripts running outside Syspro

  5. SysproCustomisationDirectories.docx

    An attempt to document the Syspro customisation directories.


Other Bits

  1. Removed testdatabaseclass.vbs and TestDataswitchInsert.vbs

    You can test these modules by using the new ModuleTestHarness.vbs in the Examples directory.


License type: Free
Pricing: Free