SQLite-OLE Scripts

This pages contains some scripts that demonstrate how the SQLite-OLE program can control other applications.

WriterDemo – a reworking of the LibreOffice Writer Demo

DLL fopen / fclose / fwrite – uses the Ascii and Wide Char versions of fopen, with fwrite and fclose to create an 8 bit character text file

NS RemoteDB Access ADODB– uses ADODB to connect to a MySQL server (installed using MAMP) to a local PC. Then copies a table from MySQL and imports it to SQLite.

NS-ImportFromExcelSheet – this is one of the Excel related functions that I use a lot in my work.

  • Link to Excel
  • Open a specified WorkBook File
  • Imports a specified WorkSheet to a SQLite table
  • Optionally pass over “n” leadings lines of the WorkSheet before importing
  • Does NOT change the used WorkBook file

NS-FSO-FileInfoToTable – use the File System Object to populate a database table

  • Create an empty database
  • Insert a table that contains the path name, file name and file size
      for all the files in a given folder and its sub-folders.
  • Use the File System Object to get the information.

NS-OnlineXMLGetAndDisplay– use the Microsoft XMLHTTP and MSXML2.DOMDocument components to:

  • go online and get a copy of the CD Catalog that is hosted on the www.w3schools.com website in XML.
  • Display all of the received XML information
  • Display the XML nodes / child nodes
  • Display only the ARTISTS nodes
  • Does NOT change the used WorkBook file

NS-Adobe-Acrobat-X – use the ADOBE Acrobat X application to edit some fields in a form.

  • Not a full script but a skeleton to help get you going.
  • OLE seems to work with Acrobat X, but not with the free versions of the ADOBE pdf reader.

ns-WMI-local– use Windows Management Instrumentation to get information about the local computer.

  • has a 3 way internal switch so that you can select between getting information about local processes, or about the local machine.

NS-wmi-getInfor-send-to-DB-v02 – use Windows Management Instrumentation to get information about the local computer.

  • has a 13 way internal switch so that you can select the target information and send the results to a SQLite table

ns_delete_empty_folders – deletes empty folders, including nested ones, starting at a user defined folders.

NS-VBA-PPT-Replace– uses OLE to access the PowerPoint VBA environment and insert code into VBA. Create a presentation with text and then use VBA to replace a text string. Fast and POWERFUL!

ns-sync-folders – a small but powerful script (~125 lines of code) to create and maintain a back-up of a source folder (and all of its contents) to a destination folder.!