Applies to: Docklight Scripting (all versions), Article ID: dl_faq057
A straightforward approach for a VBScript environment like Docklight Scripting is using ADODB objects (Microsoft ADO ActiveX Database Objects), and setting up your database as an ODBC data source.
Below you find a ready-to-run example that uses only Windows built-in Microsoft Access drivers to set up an example database connection, and perform some read/write access. Microsoft SQL Server or MySQL access should work in a simular way, once the required 32-bit connector for ODBC is installed and set up.
Please check the documentation “Docklight_ODBC_example.pdf” included in our example for details on how to set up the ODBC connection, and how to enable access to such external resources in Docklight’s VBScript engine.
Please also see the general Microsoft documentation for ADO and related examples. We recommend to look at the “Visual Basic” examples. (Not the VBScript examples, which showcase HTML pages with added VBScript code and add unnecessary complexity for our purposes.)
DatabaseOdbcConnectionExample.zip – Database access via ADODB and ODBC