Importing DLL
Posted by Mohammad Rahhal, Last modified by Abdullah Almasharfah on 10 January 2019 11:42 AM

Importing DLL

VTL Script allows users to import Dlls (COM DLL) by using CreateObject Function.


 Public Sub main()

    Dim Connection
    Dim Recordset
    Dim SQL
    'declare the SQL statement that will query the database
    SQL = "SELECT * FROM Test"
    'create an instance of the ADO connection and recordset objects
    Set Connection = CreateObject("ADODB.Connection")
    Set Recordset = CreateObject("ADODB.Recordset")
    'open the connection to the database
    Connection.Open "DSN=Examples_dsn"
    'Open the recordset object executing the SQL statement and return records
    Recordset.Open SQL,Connection
    'first of all determine whether there are any records
    Dim vEOF
    vEof = Recordset.EOF
    If vEof Then
    AlertMessage "No records returned."
    'if there are records then loop through the fields
        Do While NOT vEof
            AlertMessage Recordset("row")
            AlertMessage Recordset("row2")
    End If
    'close the connection and recordset objects freeing up resources
    Set Recordset=nothing
    Set Connection=nothing

End Sub


When attaching the script the below window will appear to alert users about all DLLs that are used inside the script, to run the script you should allow DLL imports else the script will not run.

Import DLL

Back to VTL Client Script Index


(1 vote(s))
Not helpful

Comments (0)
Post a new comment
Full Name:
CAPTCHA Verification 
Please enter the text you see in the image into the textbox below (we use this to prevent automated submissions).

Help Desk Software by Hybrid Solutions