Discover our Clipsal Smart Home packages as seen on The Block 2018

in location

OR

I'm looking for

  • Wholesalers
    • Uncheck All Check All
  • EXPERTISE
    • Expand
    • Expand
    • Expand
    • Uncheck All Check All
  • Switchboard Manufacturers
    • Uncheck All Check All
OR

The best way to see what Clipsal electric products can do for your home is seeing them in action at a Clipsal Display Centre.

Product stock may vary according to location. If you're after a specific product range, please check with your chosen location before visiting.

10 Results
    Load More Load Complete
    Change Location

    How to write to ClearSCADA DataTable from Excel using VBScript and ODBC

    DISCLAIMER

    The example below is intended to demonstrate one or more features or methods and is presented as a configuration example only. Schneider Electric assumes no liability for the use or application of this example or any portion thereof.


    Sometimes it is helpful to be able to write to a ClearSCADA DataTable from an external tool.
    As an example, the following code, written in VBScript inside an Excel spreadsheet, will add a row in a DataTable called "Populate", which contains two fields, one string and one long value, as long as the DSN and credentials are correct:

    Sub test()

    Set ado = CreateObject("ADODB.Connection")
    ado.Open "DSN=ClearSCADA", "Eng", "password"
    If ado.State = 1 Then
        MsgBox "Connected"
    End If

    queryText = "insert into Populate (Comment, Num) values ('AnyStringAny', 100)"
    ado.Execute queryText
    ado.Close

    Set ado = Nothing

    MsgBox "Done"

    End Sub

    Didn’t find what you were looking for?

    Try Searching Again View Our Categories

    Need further assistance?

    Our Customer Care department provides total customer service solutions for our residential, industrial and commercial applications.

    Get Assistance