Re: Reading SPSS v22 with Access database

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Re: Reading SPSS v22 with Access database

Aaron Weis

 

Thanks for your response, Jon.  Unfortunately in my setup, both Access and Statistics are 32-bit.  As far as whether we are using the SPSS ODBC driver in Access, I am not sure.  I didn’t design this database and I am not overly familiar with db design; how can I check whether it is using the SPSS ODBC driver?

 

Thanks,

Aaron

 

 

From: Jon K Peck [mailto:[hidden email]]
Sent: Tuesday, October 15, 2013 11:17 AM
To: Aaron Weis
Subject: Re: [SPSSX-L] Reading SPSS v22 with Access database

 

There were no changes in sav file formats in V22.  I suppose that you are using the SPSS ODBC driver from Access.  If your Office and Statistics version are not the same bit size, though, this won't work.  I happen to be on Office 2007, which is 32-bit only and have a 64-bit Statistics 22, and they will not talk to each other.




Jon Peck (no "h") aka Kim
Senior Software Engineer, IBM
[hidden email]
phone: 720-342-5621




From:        Aaron Weis <[hidden email]>
To:        [hidden email],
Date:        10/15/2013 09:11 AM
Subject:        [SPSSX-L] Reading SPSS v22 with Access database
Sent by:        "SPSSX(r) Discussion" <[hidden email]>





 
I have an Access database that is designed to create an .html file with variable/value labels after loading in a SPSS file; it worked great with SPSS v21 but we have since upgraded to v22.  I attempted to use the Access database this morning and I got an error stating “SPSS is not installed on this computer”.  However, SPSS is installed on the computer and I can open SPSS separately just fine.  
 
I am wondering whether there was some technical change in .sav files from v21 to v22 that may be causing this issue.  Thank you in advance for any insight you may have.
 
Thanks
 
Aaron Weis
Horizon Research, Inc.
326 Cloister Ct.
Chapel Hill, NC 27514
(919) 489-1725
 
 

Reply | Threaded
Open this post in threaded view
|

Re: Reading SPSS v22 with Access database

Aaron Weis

Jon,

 

I don’t see the SPSS ODBC driver in the list.  In addition, Access is using VBA to import the dataset but I don’t see any references to any .tlb files.  Below is the chunk of code where I think the problem may lie, is the problem in the code calling “spss.application16?”

 

Aaron

 

Sub ExtractSPSS()

    Dim fileName As String

    fileName = GetOpenFile("Z:\Project\Data Collection and Analysis\Data", "Find the SPSS dataset to add/update", "sav")

   

    If fileName = "" Then

        Exit Sub

    End If

   

    DoCmd.Hourglass (True)

 

    Dim Delim As String

    Delim = Chr(9)

 

    Dim objSPSSApp As Object

    Dim objDataDoc As ISpssDataDoc

    Dim objDocuments As ISpssDocuments

    Dim blCloseSPSS As Boolean

   

    On Error Resume Next

    Set objSPSSApp = GetObject(, "SPSS.Application16")

       

    If objSPSSApp Is Nothing Then

        blCloseSPSS = True

        Set objSPSSApp = CreateObject("SPSS.Application16")

        If objSPSSApp Is Nothing Then

            MsgBox "SPSS is not installed on your computer"

            DoCmd.Hourglass (False)

            Exit Sub

        End If

    End If

   

    On Error GoTo 0

   

    objSPSSApp.OpenDataDoc (fileName)

    Set objDocuments = objSPSSApp.Documents

    Set objDataDoc = objDocuments.GetDataDoc(0)

 

From: Jon K Peck [mailto:[hidden email]]
Sent: Tuesday, October 15, 2013 12:01 PM
To: Aaron Weis
Subject: Re: [SPSSX-L] Reading SPSS v22 with Access database

 

The user interface varies from one version of Access to another, and the code could be done several different ways, so I can't really tell you where to look.  It could be referenced in a SQL statement or referred to as an external data source.  You might start by seeing whether the ODBC driver is actually installed on your system.  Use Control Panel > Administrative  Tools >ODBC Data Sources (ODBC) to see whether you have this driver.

It is also possible that this is being done through COM automation, which would be a completely different solution.  In that case, it could be that you have VBA code in the database that requires References to the Statistics 22 COM libraries.  If you open Access and press F11, you can see whether you have code modules for this, and there is a References menu that allows you to add libraries for the code to use.


Jon Peck (no "h") aka Kim
Senior Software Engineer, IBM
[hidden email]
phone: 720-342-5621




From:        Aaron Weis <[hidden email]>
To:        [hidden email],
Date:        10/15/2013 09:51 AM
Subject:        Re: [SPSSX-L] Reading SPSS v22 with Access database
Sent by:        "SPSSX(r) Discussion" <[hidden email]>





 
Thanks for your response, Jon.  Unfortunately in my setup, both Access and Statistics are 32-bit.  As far as whether we are using the SPSS ODBC driver in Access, I am not sure.  I didn’t design this database and I am not overly familiar with db design; how can I check whether it is using the SPSS ODBC driver?
 
Thanks,
Aaron
 
 
From: Jon K Peck [[hidden email]]
Sent:
Tuesday, October 15, 2013 11:17 AM
To:
Aaron Weis
Subject:
Re: [SPSSX-L] Reading SPSS v22 with Access database

 
There were no changes in sav file formats in V22.  I suppose that you are using the SPSS ODBC driver from Access.  If your Office and Statistics version are not the same bit size, though, this won't work.  I happen to be on Office 2007, which is 32-bit only and have a 64-bit Statistics 22, and they will not talk to each other.




Jon Peck (no "h") aka Kim
Senior Software Engineer, IBM
[hidden email]
phone: 720-342-5621





From:        
Aaron Weis <[hidden email]>
To:        
[hidden email],
Date:        
10/15/2013 09:11 AM

Subject:        
[SPSSX-L] Reading SPSS v22 with Access database
Sent by:        
"SPSSX(r) Discussion" <[hidden email]>






 
I have an Access database that is designed to create an .html file with variable/value labels after loading in a SPSS file; it worked great with SPSS v21 but we have since upgraded to v22.  I attempted to use the Access database this morning and I got an error stating “SPSS is not installed on this computer”.  However, SPSS is installed on the computer and I can open SPSS separately just fine.  

 
I am wondering whether there was some technical change in .sav files from v21 to v22 that may be causing this issue.  Thank you in advance for any insight you may have.

 
Thanks

 
Aaron Weis

Horizon Research, Inc.

326 Cloister Ct.

Chapel Hill, NC 27514

(919) 489-1725

 
 

Reply | Threaded
Open this post in threaded view
|

Re: Reading SPSS v22 with Access database

David Marso
Administrator

Aaron,
"Access is using VBA to import the dataset but I don’t see any references to any .tlb files."

Well that is very likely the crux of the problem:
Likely that adding a reference to spsswin.tlb will correct the problem.
I don't have M$ Access on this machine so can only suggest you do an F1.
On my machine the SPSS tlb files are located in .../Program Files/Common/IBM/SPS/COM

The message you reported is NOT helpful because it is in your code and not something that arises from the GetObject call.
HTH, David

Aaron Weis wrote
Jon,

I don’t see the SPSS ODBC driver in the list.  In addition, Access is using VBA to import the dataset but I don’t see any references to any .tlb files.  Below is the chunk of code where I think the problem may lie, is the problem in the code calling “spss.application16?”

Aaron

Sub ExtractSPSS()
    Dim fileName As String
    fileName = GetOpenFile("Z:\Project\Data Collection and Analysis\Data", "Find the SPSS dataset to add/update", "sav")

    If fileName = "" Then
        Exit Sub
    End If

    DoCmd.Hourglass (True)

    Dim Delim As String
    Delim = Chr(9)

    Dim objSPSSApp As Object
    Dim objDataDoc As ISpssDataDoc
    Dim objDocuments As ISpssDocuments
    Dim blCloseSPSS As Boolean

    On Error Resume Next
    Set objSPSSApp = GetObject(, "SPSS.Application16")

    If objSPSSApp Is Nothing Then
        blCloseSPSS = True
        Set objSPSSApp = CreateObject("SPSS.Application16")
        If objSPSSApp Is Nothing Then
            MsgBox "SPSS is not installed on your computer"
            DoCmd.Hourglass (False)
            Exit Sub
        End If
    End If

    On Error GoTo 0

    objSPSSApp.OpenDataDoc (fileName)
    Set objDocuments = objSPSSApp.Documents
    Set objDataDoc = objDocuments.GetDataDoc(0)

From: Jon K Peck [mailto:[hidden email]]
Sent: Tuesday, October 15, 2013 12:01 PM
To: Aaron Weis
Subject: Re: [SPSSX-L] Reading SPSS v22 with Access database

The user interface varies from one version of Access to another, and the code could be done several different ways, so I can't really tell you where to look.  It could be referenced in a SQL statement or referred to as an external data source.  You might start by seeing whether the ODBC driver is actually installed on your system.  Use Control Panel > Administrative  Tools >ODBC Data Sources (ODBC) to see whether you have this driver.

It is also possible that this is being done through COM automation, which would be a completely different solution.  In that case, it could be that you have VBA code in the database that requires References to the Statistics 22 COM libraries.  If you open Access and press F11, you can see whether you have code modules for this, and there is a References menu that allows you to add libraries for the code to use.


Jon Peck (no "h") aka Kim
Senior Software Engineer, IBM
[hidden email]<mailto:[hidden email]>
phone: 720-342-5621




From:        Aaron Weis <[hidden email]<mailto:[hidden email]>>
To:        [hidden email]<mailto:[hidden email]>,
Date:        10/15/2013 09:51 AM
Subject:        Re: [SPSSX-L] Reading SPSS v22 with Access database
Sent by:        "SPSSX(r) Discussion" <[hidden email]<mailto:[hidden email]>>
________________________________




Thanks for your response, Jon.  Unfortunately in my setup, both Access and Statistics are 32-bit.  As far as whether we are using the SPSS ODBC driver in Access, I am not sure.  I didn’t design this database and I am not overly familiar with db design; how can I check whether it is using the SPSS ODBC driver?

Thanks,
Aaron


From: Jon K Peck [mailto:[hidden email]]
Sent: Tuesday, October 15, 2013 11:17 AM
To: Aaron Weis
Subject: Re: [SPSSX-L] Reading SPSS v22 with Access database

There were no changes in sav file formats in V22.  I suppose that you are using the SPSS ODBC driver from Access.  If your Office and Statistics version are not the same bit size, though, this won't work.  I happen to be on Office 2007, which is 32-bit only and have a 64-bit Statistics 22, and they will not talk to each other.




Jon Peck (no "h") aka Kim
Senior Software Engineer, IBM
[hidden email]<mailto:[hidden email]>
phone: 720-342-5621




From:        Aaron Weis <[hidden email]<mailto:[hidden email]>>
To:        [hidden email]<mailto:[hidden email]>,
Date:        10/15/2013 09:11 AM
Subject:        [SPSSX-L] Reading SPSS v22 with Access database
Sent by:        "SPSSX(r) Discussion" <[hidden email]<mailto:[hidden email]>>
________________________________





I have an Access database that is designed to create an .html file with variable/value labels after loading in a SPSS file; it worked great with SPSS v21 but we have since upgraded to v22.  I attempted to use the Access database this morning and I got an error stating “SPSS is not installed on this computer”.  However, SPSS is installed on the computer and I can open SPSS separately just fine.

I am wondering whether there was some technical change in .sav files from v21 to v22 that may be causing this issue.  Thank you in advance for any insight you may have.

Thanks

Aaron Weis
Horizon Research, Inc.
326 Cloister Ct.
Chapel Hill, NC 27514
(919) 489-1725
Please reply to the list and not to my personal email.
Those desiring my consulting or training services please feel free to email me.
---
"Nolite dare sanctum canibus neque mittatis margaritas vestras ante porcos ne forte conculcent eas pedibus suis."
Cum es damnatorum possederunt porcos iens ut salire off sanguinum cliff in abyssum?"
Reply | Threaded
Open this post in threaded view
|

Re: Reading SPSS v22 with Access database

David Marso
Administrator
Comment!
On Error Resume Next?
Seriously.  That is shameful!!!
Please reply to the list and not to my personal email.
Those desiring my consulting or training services please feel free to email me.
---
"Nolite dare sanctum canibus neque mittatis margaritas vestras ante porcos ne forte conculcent eas pedibus suis."
Cum es damnatorum possederunt porcos iens ut salire off sanguinum cliff in abyssum?"