.NET integration plugin error

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

.NET integration plugin error

Joshua
I'm running SPSS version 19 and 20 with Visual studio 2012. I have installed the .net integration tools (v19) and i'm just trying to run a single line of SPSS code as a test. i have included the "Imports SPSS.BackendAPI.Controller" statement, and references to the SPSS.BackendAPI.Controller.dll and SPSS.BackendAPI.dll files. I'm trying to run the following code, that i downloaded from the DeveloperWorks site, with slight modification:
 
Public Shared Sub RunSPSS(ByRef output As String, Optional ByVal SpssXdPath As String = "")
 Dim SPSS_Processor As Processor
 If Not SpssXdPath Is String.Empty Then
 SPSS_Processor = New Processor(SpssXdPath)
 Else
 SPSS_Processor = New Processor()
 End If
 
 SPSS_Processor.StartSPSS(output)
 SPSS_Processor.Submit("GET FILE='c:/temp/test.sav'.")
 SPSS_Processor.Submit("DESCRIPTIVES VAR1.")
 
 SPSS_Processor.StopSPSS()
End Sub
 
The problem is, I can't get the program to run past the SPSS_Processor=New Processor() line. I'm calling this sub with these commands, all give an error:
 
RunSPSS("C:\temp\results.txt")
RunSPSS("C:\temp\results.txt", "C:\Program Files\IBM\SPSS\Statistics\20")
 these two throw the error in the subject line, "plugin version is greater than IBM SPSS Statistics version"
 
RunSPSS("C:\temp\results.txt", "C:\Program Files\IBM\SPSS\Statistics\19")
 this throws a different error: "The type initializer for 'SPSS.BackendAPI.Controller.ErrorCode.SpssErrorCode' threw an exception."
 
any ideas about what i'm doing wrong here would help.