Jump to content

Help needed: SQLLink Plugin doesn't work, not even in command line


learnnch

Recommended Posts

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.

Link to comment
Share on other sites

  • 3 weeks later...

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

Link to comment
Share on other sites

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!

Link to comment
Share on other sites

  • 1 month later...
I solved the SQLLink plugin problem by putting the arguments over as many needed line as available (basically one word per line).

 

Is it possible that you could post a screenshot of how you got sqllink to work? Did you include quotes on any of your lines? What database are you working with?

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...