Jump to content

learnnch

Members
  • Posts

    3
  • Joined

  • Last visited

Posts posted by learnnch

  1. I got feedup trying to get the SQLLINK plugin to work, so I wrote a small consoleapp in visual studio. Works fine and it is easy to modify to your needs. I use it with mysql.

     

    Regards Henrik

     

    Code:

    Module Module1

     

    Public Sub Main()

    On Error GoTo UnexpectedError

     

    Dim streng, strsql, SQL_STRING, DNS_SOURCE As String

    Dim arg_liste As Array

     

    streng = ""

     

    For Each arg As String In Environment.GetCommandLineArgs()

    streng = streng & ";" & arg

    Next arg

     

    arg_liste = Split(streng, ";")

     

    ' DNS_SOURCE = arg_liste(1)

    SQL_STRING = arg_liste(2)

     

    Dim objConn = CreateObject("ADODB.Connection")

    Dim objRs = CreateObject("ADODB.RecordSet")

    objConn.open("IVRDB")

    objConn.execute(SQL_STRING)

     

    Console.WriteLine("OK")

    objConn.Close()

    Exit Sub

     

    UnexpectedError:

    streng = "FAIL: " & Str$(Err.Number) & "." & vbCrLf & Err.Description & vbCrLf & vbCrLf & "SQL_STRING:" & SQL_STRING

    Console.WriteLine(streng)

    Exit Sub

     

    End Sub

     

    End Module

     

    Wow, 'Henrik', very generous of you to share your code with all - I'm certain many forumers will appreciate it and find it useful. I, for one though appreciate your good work and geneosity, am in no position as to how to use it. I solved the SQLLink plugin problem by putting the arguments over as many needed line as available (basically one word per line).

     

     

    Keep it up!

  2. I have an OGM which calls for the execution of an .exe file (IVM SQLLink plugin).

     

    When I run in command prompt as follows:

     

    c:\...absolutepath1\SQLLINK.exe c:\...absolutepath2\dsn_name "INSERT INTO table1 VALUES ('value1','value2')";

     

    I got the error msg. I have even used the 8-bit folder names for each of those that exceeds 8-bit in the path. I have confirmed the correctness of each of these shortened folder names by navigating in the command prompt (i.e. c:\).

     

    please give pointers as to what to look out for.

     

    thanks in advance.

  3. Greetings all,

     

    (Edit-added after posting: PROBLEM SOLVED! - launch ivm in command prompt, instead of from 'shortcut'! - but now I have a new problem with sqllink plugin - read another post.)

     

    I have an OGM; it works in simulator mode. This OGM calls for the execution of an .exe file (not an IVM plugin though). In simulator, I could see the .exe file being launched (as evidenced by the fleeting appearance of the black command prompt box).

     

    however, in a live call, this .exe file just doesn't get launched (as there is no corresponding fleeting appearnce of the command prompt box), but the live 'commentary' says it is playing this file (and the call log registers so also).

     

    please give pointers as to what to look out for.

     

    thanks in advance. ;)

×
×
  • Create New...