Results 1 to 2 of 2
  1. #1
    Senior Member
    Join Date
    May 2014
    Posts
    145

    Default How to Import Functions from a Non COM Dll into Client VTL

    Hello

    I have a non com dll developed for some calculations. Can I import the functions in this dll into VB script.

    If possible, pleas give an example code to do this

    Thanks

  2. #2
    Administrator Rawan-HS's Avatar
    Join Date
    Apr 2015
    Posts
    411

    Default

    Dear Edakad


    You can load your dll if it is registered with the system using CreateObject function.

    Check the following code which is connect with database using VTL

    Note : If you developed your dll using .net check this article


    Code:
     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 
    If Recordset.EOF Then 
        AlertMessage "No records returned."
    Else 
    'if there are records then loop through the fields 
        Do While NOT Recordset.Eof   
         AlertMessage Recordset("row")
         AlertMessage Recordset("row2")
         Recordset.MoveNext     
        Loop
    End If
    'close the connection and recordset objects freeing up resources
    Recordset.Close
    Set Recordset=nothing
    Connection.Close
    Set Connection=nothing
    End Sub

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Client VTL : SymbolInfoInteger return Nothing
    By Edakad in forum VertexFX API/VTL Forum
    Replies: 2
    Last Post: 11-20-2016, 11:39 AM
  2. MQL to VTL conversion -- Similar Functions needed
    By mayankj990@gmail.com in forum VertexFX API/VTL Forum
    Replies: 8
    Last Post: 06-18-2014, 04:31 PM
  3. VTL Functions
    By AmitSharma in forum VertexFX API/VTL Forum
    Replies: 6
    Last Post: 03-11-2014, 02:48 PM
  4. Similar VTL functions needed
    By soori1234 in forum VertexFX API/VTL Forum
    Replies: 4
    Last Post: 01-28-2014, 06:19 PM
  5. Please help to return value from functions in client script
    By nhasan in forum VertexFX API/VTL Forum
    Replies: 8
    Last Post: 01-09-2014, 09:40 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •