ODBC and Access

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

ODBC and Access

Maguin, Eugene

Maybe a question for Jon.

I want read an access database table. I putz through the menu and ‘Finish’. No database table but a nice error.

 

GET DATA

  /TYPE=ODBC

  /CONNECT='DSN=MS Access Database;DBQ=R:\Maguin\TestDatabase.accdb;DriverId=25;FIL=MS '+

    'Access;MaxBufferSize=2048;PageTimeout=5;'

  /SQL='SELECT ID, rid, v1, v2, v3, v4, v5 FROM Test'

  /ASSUMEDSTRWIDTH=255.

 

Error.  Command name: GET DATA

Unknown error

Execution of this command stops.

 

 

A bit of background. In the database wizard, the ‘ODBC Data Sources’, I select ‘MS Access Database’. I click ‘Next’ and the “ODBC Driver Login’ window comes up and I browse to select the database, and OK. The database opens and I select fields and ‘Finish’.

 

Alternatively, since I’m stumbling around in the dark, pick ‘Add ODBC data source’ button, and ‘User Account Control’ box comes up and wants an ODBC administrator login, which I’m not (Our IT manage is mystified by this).

 

So: An explanation please.

 

Thanks, Gene Maguin

===================== To manage your subscription to SPSSX-L, send a message to [hidden email] (not to SPSSX-L), with no body text except the command. To leave the list, send the command SIGNOFF SPSSX-L For a list of commands to manage subscriptions, send the command INFO REFCARD
Reply | Threaded
Open this post in threaded view
|

Re: ODBC and Access

Rick Oliver
Probably because you have the 32-bit version of Access/Office and the 64-bit version of SPSS Statistics, and 32-bit Access ODBC driver can't be used by a 64-bit app. The last time I checked, there wasn't a workaround for this.

On Wed, Nov 21, 2018 at 10:43 AM Maguin, Eugene <[hidden email]> wrote:

Maybe a question for Jon.

I want read an access database table. I putz through the menu and ‘Finish’. No database table but a nice error.

 

GET DATA

  /TYPE=ODBC

  /CONNECT='DSN=MS Access Database;DBQ=R:\Maguin\TestDatabase.accdb;DriverId=25;FIL=MS '+

    'Access;MaxBufferSize=2048;PageTimeout=5;'

  /SQL='SELECT ID, rid, v1, v2, v3, v4, v5 FROM Test'

  /ASSUMEDSTRWIDTH=255.

 

Error.  Command name: GET DATA

Unknown error

Execution of this command stops.

 

 

A bit of background. In the database wizard, the ‘ODBC Data Sources’, I select ‘MS Access Database’. I click ‘Next’ and the “ODBC Driver Login’ window comes up and I browse to select the database, and OK. The database opens and I select fields and ‘Finish’.

 

Alternatively, since I’m stumbling around in the dark, pick ‘Add ODBC data source’ button, and ‘User Account Control’ box comes up and wants an ODBC administrator login, which I’m not (Our IT manage is mystified by this).

 

So: An explanation please.

 

Thanks, Gene Maguin

===================== To manage your subscription to SPSSX-L, send a message to [hidden email] (not to SPSSX-L), with no body text except the command. To leave the list, send the command SIGNOFF SPSSX-L For a list of commands to manage subscriptions, send the command INFO REFCARD
===================== To manage your subscription to SPSSX-L, send a message to [hidden email] (not to SPSSX-L), with no body text except the command. To leave the list, send the command SIGNOFF SPSSX-L For a list of commands to manage subscriptions, send the command INFO REFCARD
Reply | Threaded
Open this post in threaded view
|

Re: ODBC and Access

Rick Oliver
"Note: If you are running the Windows 64-bit version of IBM® SPSS® Statistics, you cannot read Excel, Access, or dBASE database sources with GET DATA /TYPE=ODBC. The 32-bit ODBC drivers for these products are not compatible. You can, however, read Excel files with GET DATA /TYPE=XLS."



On Wed, Nov 21, 2018 at 10:50 AM Rick Oliver <[hidden email]> wrote:
Probably because you have the 32-bit version of Access/Office and the 64-bit version of SPSS Statistics, and 32-bit Access ODBC driver can't be used by a 64-bit app. The last time I checked, there wasn't a workaround for this.

On Wed, Nov 21, 2018 at 10:43 AM Maguin, Eugene <[hidden email]> wrote:

Maybe a question for Jon.

I want read an access database table. I putz through the menu and ‘Finish’. No database table but a nice error.

 

GET DATA

  /TYPE=ODBC

  /CONNECT='DSN=MS Access Database;DBQ=R:\Maguin\TestDatabase.accdb;DriverId=25;FIL=MS '+

    'Access;MaxBufferSize=2048;PageTimeout=5;'

  /SQL='SELECT ID, rid, v1, v2, v3, v4, v5 FROM Test'

  /ASSUMEDSTRWIDTH=255.

 

Error.  Command name: GET DATA

Unknown error

Execution of this command stops.

 

 

A bit of background. In the database wizard, the ‘ODBC Data Sources’, I select ‘MS Access Database’. I click ‘Next’ and the “ODBC Driver Login’ window comes up and I browse to select the database, and OK. The database opens and I select fields and ‘Finish’.

 

Alternatively, since I’m stumbling around in the dark, pick ‘Add ODBC data source’ button, and ‘User Account Control’ box comes up and wants an ODBC administrator login, which I’m not (Our IT manage is mystified by this).

 

So: An explanation please.

 

Thanks, Gene Maguin

===================== To manage your subscription to SPSSX-L, send a message to [hidden email] (not to SPSSX-L), with no body text except the command. To leave the list, send the command SIGNOFF SPSSX-L For a list of commands to manage subscriptions, send the command INFO REFCARD
===================== To manage your subscription to SPSSX-L, send a message to [hidden email] (not to SPSSX-L), with no body text except the command. To leave the list, send the command SIGNOFF SPSSX-L For a list of commands to manage subscriptions, send the command INFO REFCARD
Reply | Threaded
Open this post in threaded view
|

Re: ODBC and Access

Jon Peck
While what Rick says is true (and the driver situation is out of IBM's control),  I get a different message complaining about the ODBC Administrator or it says the driver does not exist.  In order to get an Access table into Statistics with this configuration, you can export it from Access as csv and then read that into Statistics.

On Wed, Nov 21, 2018 at 9:58 AM Rick Oliver <[hidden email]> wrote:
"Note: If you are running the Windows 64-bit version of IBM® SPSS® Statistics, you cannot read Excel, Access, or dBASE database sources with GET DATA /TYPE=ODBC. The 32-bit ODBC drivers for these products are not compatible. You can, however, read Excel files with GET DATA /TYPE=XLS."



On Wed, Nov 21, 2018 at 10:50 AM Rick Oliver <[hidden email]> wrote:
Probably because you have the 32-bit version of Access/Office and the 64-bit version of SPSS Statistics, and 32-bit Access ODBC driver can't be used by a 64-bit app. The last time I checked, there wasn't a workaround for this.

On Wed, Nov 21, 2018 at 10:43 AM Maguin, Eugene <[hidden email]> wrote:

Maybe a question for Jon.

I want read an access database table. I putz through the menu and ‘Finish’. No database table but a nice error.

 

GET DATA

  /TYPE=ODBC

  /CONNECT='DSN=MS Access Database;DBQ=R:\Maguin\TestDatabase.accdb;DriverId=25;FIL=MS '+

    'Access;MaxBufferSize=2048;PageTimeout=5;'

  /SQL='SELECT ID, rid, v1, v2, v3, v4, v5 FROM Test'

  /ASSUMEDSTRWIDTH=255.

 

Error.  Command name: GET DATA

Unknown error

Execution of this command stops.

 

 

A bit of background. In the database wizard, the ‘ODBC Data Sources’, I select ‘MS Access Database’. I click ‘Next’ and the “ODBC Driver Login’ window comes up and I browse to select the database, and OK. The database opens and I select fields and ‘Finish’.

 

Alternatively, since I’m stumbling around in the dark, pick ‘Add ODBC data source’ button, and ‘User Account Control’ box comes up and wants an ODBC administrator login, which I’m not (Our IT manage is mystified by this).

 

So: An explanation please.

 

Thanks, Gene Maguin

===================== To manage your subscription to SPSSX-L, send a message to [hidden email] (not to SPSSX-L), with no body text except the command. To leave the list, send the command SIGNOFF SPSSX-L For a list of commands to manage subscriptions, send the command INFO REFCARD
===================== To manage your subscription to SPSSX-L, send a message to [hidden email] (not to SPSSX-L), with no body text except the command. To leave the list, send the command SIGNOFF SPSSX-L For a list of commands to manage subscriptions, send the command INFO REFCARD


--
Jon K Peck
[hidden email]

===================== To manage your subscription to SPSSX-L, send a message to [hidden email] (not to SPSSX-L), with no body text except the command. To leave the list, send the command SIGNOFF SPSSX-L For a list of commands to manage subscriptions, send the command INFO REFCARD
Reply | Threaded
Open this post in threaded view
|

Re: ODBC and Access

Rick Oliver
I think you can also export from Access to an Excel-format file, which might be somewhat easier than CSV to read into Statistics.

On Wed, Nov 21, 2018 at 11:51 AM Jon Peck <[hidden email]> wrote:
While what Rick says is true (and the driver situation is out of IBM's control),  I get a different message complaining about the ODBC Administrator or it says the driver does not exist.  In order to get an Access table into Statistics with this configuration, you can export it from Access as csv and then read that into Statistics.

On Wed, Nov 21, 2018 at 9:58 AM Rick Oliver <[hidden email]> wrote:
"Note: If you are running the Windows 64-bit version of IBM® SPSS® Statistics, you cannot read Excel, Access, or dBASE database sources with GET DATA /TYPE=ODBC. The 32-bit ODBC drivers for these products are not compatible. You can, however, read Excel files with GET DATA /TYPE=XLS."



On Wed, Nov 21, 2018 at 10:50 AM Rick Oliver <[hidden email]> wrote:
Probably because you have the 32-bit version of Access/Office and the 64-bit version of SPSS Statistics, and 32-bit Access ODBC driver can't be used by a 64-bit app. The last time I checked, there wasn't a workaround for this.

On Wed, Nov 21, 2018 at 10:43 AM Maguin, Eugene <[hidden email]> wrote:

Maybe a question for Jon.

I want read an access database table. I putz through the menu and ‘Finish’. No database table but a nice error.

 

GET DATA

  /TYPE=ODBC

  /CONNECT='DSN=MS Access Database;DBQ=R:\Maguin\TestDatabase.accdb;DriverId=25;FIL=MS '+

    'Access;MaxBufferSize=2048;PageTimeout=5;'

  /SQL='SELECT ID, rid, v1, v2, v3, v4, v5 FROM Test'

  /ASSUMEDSTRWIDTH=255.

 

Error.  Command name: GET DATA

Unknown error

Execution of this command stops.

 

 

A bit of background. In the database wizard, the ‘ODBC Data Sources’, I select ‘MS Access Database’. I click ‘Next’ and the “ODBC Driver Login’ window comes up and I browse to select the database, and OK. The database opens and I select fields and ‘Finish’.

 

Alternatively, since I’m stumbling around in the dark, pick ‘Add ODBC data source’ button, and ‘User Account Control’ box comes up and wants an ODBC administrator login, which I’m not (Our IT manage is mystified by this).

 

So: An explanation please.

 

Thanks, Gene Maguin

===================== To manage your subscription to SPSSX-L, send a message to [hidden email] (not to SPSSX-L), with no body text except the command. To leave the list, send the command SIGNOFF SPSSX-L For a list of commands to manage subscriptions, send the command INFO REFCARD
===================== To manage your subscription to SPSSX-L, send a message to [hidden email] (not to SPSSX-L), with no body text except the command. To leave the list, send the command SIGNOFF SPSSX-L For a list of commands to manage subscriptions, send the command INFO REFCARD


--
Jon K Peck
[hidden email]

===================== To manage your subscription to SPSSX-L, send a message to [hidden email] (not to SPSSX-L), with no body text except the command. To leave the list, send the command SIGNOFF SPSSX-L For a list of commands to manage subscriptions, send the command INFO REFCARD
Reply | Threaded
Open this post in threaded view
|

Re: ODBC and Access

Jon Peck
As long as you don't do it with ODBC :-(

On Wed, Nov 21, 2018 at 10:57 AM Rick Oliver <[hidden email]> wrote:
I think you can also export from Access to an Excel-format file, which might be somewhat easier than CSV to read into Statistics.

On Wed, Nov 21, 2018 at 11:51 AM Jon Peck <[hidden email]> wrote:
While what Rick says is true (and the driver situation is out of IBM's control),  I get a different message complaining about the ODBC Administrator or it says the driver does not exist.  In order to get an Access table into Statistics with this configuration, you can export it from Access as csv and then read that into Statistics.

On Wed, Nov 21, 2018 at 9:58 AM Rick Oliver <[hidden email]> wrote:
"Note: If you are running the Windows 64-bit version of IBM® SPSS® Statistics, you cannot read Excel, Access, or dBASE database sources with GET DATA /TYPE=ODBC. The 32-bit ODBC drivers for these products are not compatible. You can, however, read Excel files with GET DATA /TYPE=XLS."



On Wed, Nov 21, 2018 at 10:50 AM Rick Oliver <[hidden email]> wrote:
Probably because you have the 32-bit version of Access/Office and the 64-bit version of SPSS Statistics, and 32-bit Access ODBC driver can't be used by a 64-bit app. The last time I checked, there wasn't a workaround for this.

On Wed, Nov 21, 2018 at 10:43 AM Maguin, Eugene <[hidden email]> wrote:

Maybe a question for Jon.

I want read an access database table. I putz through the menu and ‘Finish’. No database table but a nice error.

 

GET DATA

  /TYPE=ODBC

  /CONNECT='DSN=MS Access Database;DBQ=R:\Maguin\TestDatabase.accdb;DriverId=25;FIL=MS '+

    'Access;MaxBufferSize=2048;PageTimeout=5;'

  /SQL='SELECT ID, rid, v1, v2, v3, v4, v5 FROM Test'

  /ASSUMEDSTRWIDTH=255.

 

Error.  Command name: GET DATA

Unknown error

Execution of this command stops.

 

 

A bit of background. In the database wizard, the ‘ODBC Data Sources’, I select ‘MS Access Database’. I click ‘Next’ and the “ODBC Driver Login’ window comes up and I browse to select the database, and OK. The database opens and I select fields and ‘Finish’.

 

Alternatively, since I’m stumbling around in the dark, pick ‘Add ODBC data source’ button, and ‘User Account Control’ box comes up and wants an ODBC administrator login, which I’m not (Our IT manage is mystified by this).

 

So: An explanation please.

 

Thanks, Gene Maguin

===================== To manage your subscription to SPSSX-L, send a message to [hidden email] (not to SPSSX-L), with no body text except the command. To leave the list, send the command SIGNOFF SPSSX-L For a list of commands to manage subscriptions, send the command INFO REFCARD
===================== To manage your subscription to SPSSX-L, send a message to [hidden email] (not to SPSSX-L), with no body text except the command. To leave the list, send the command SIGNOFF SPSSX-L For a list of commands to manage subscriptions, send the command INFO REFCARD


--
Jon K Peck
[hidden email]



--
Jon K Peck
[hidden email]

===================== To manage your subscription to SPSSX-L, send a message to [hidden email] (not to SPSSX-L), with no body text except the command. To leave the list, send the command SIGNOFF SPSSX-L For a list of commands to manage subscriptions, send the command INFO REFCARD
Reply | Threaded
Open this post in threaded view
|

Re: ODBC and Access

Maguin, Eugene
In reply to this post by Rick Oliver

I passed both of your (Rick Oliver and Jon Peck) on to our IT person. He just replied that 64 bit versions of Office and spss are installed. The difference in bit size makes sense but here that difference does not seem to be present. But are you saying that the drivers themselves are supplied as 32 bit programs irrespective of whether the installed Office version is 32 or 64? I’m just curious about the interconnection issue. Let me add that I understand about exporting access tables as excel or csv files (and have done that before).

 

Gene Maguin

 

From: Rick Oliver <[hidden email]>
Sent: Wednesday, November 21, 2018 11:58 AM
To: Maguin, Eugene <[hidden email]>
Cc: [hidden email]
Subject: Re: ODBC and Access

 

"Note: If you are running the Windows 64-bit version of IBM® SPSS® Statistics, you cannot read Excel, Access, or dBASE database sources with GET DATA /TYPE=ODBC. The 32-bit ODBC drivers for these products are not compatible. You can, however, read Excel files with GET DATA /TYPE=XLS."

 

 

 

On Wed, Nov 21, 2018 at 10:50 AM Rick Oliver <[hidden email]> wrote:

Probably because you have the 32-bit version of Access/Office and the 64-bit version of SPSS Statistics, and 32-bit Access ODBC driver can't be used by a 64-bit app. The last time I checked, there wasn't a workaround for this.

 

On Wed, Nov 21, 2018 at 10:43 AM Maguin, Eugene <[hidden email]> wrote:

Maybe a question for Jon.

I want read an access database table. I putz through the menu and ‘Finish’. No database table but a nice error.

 

GET DATA

  /TYPE=ODBC

  /CONNECT='DSN=MS Access Database;DBQ=R:\Maguin\TestDatabase.accdb;DriverId=25;FIL=MS '+

    'Access;MaxBufferSize=2048;PageTimeout=5;'

  /SQL='SELECT ID, rid, v1, v2, v3, v4, v5 FROM Test'

  /ASSUMEDSTRWIDTH=255.

 

Error.  Command name: GET DATA

Unknown error

Execution of this command stops.

 

 

A bit of background. In the database wizard, the ‘ODBC Data Sources’, I select ‘MS Access Database’. I click ‘Next’ and the “ODBC Driver Login’ window comes up and I browse to select the database, and OK. The database opens and I select fields and ‘Finish’.

 

Alternatively, since I’m stumbling around in the dark, pick ‘Add ODBC data source’ button, and ‘User Account Control’ box comes up and wants an ODBC administrator login, which I’m not (Our IT manage is mystified by this).

 

So: An explanation please.

 

Thanks, Gene Maguin

===================== To manage your subscription to SPSSX-L, send a message to [hidden email] (not to SPSSX-L), with no body text except the command. To leave the list, send the command SIGNOFF SPSSX-L For a list of commands to manage subscriptions, send the command INFO REFCARD

===================== To manage your subscription to SPSSX-L, send a message to [hidden email] (not to SPSSX-L), with no body text except the command. To leave the list, send the command SIGNOFF SPSSX-L For a list of commands to manage subscriptions, send the command INFO REFCARD
Reply | Threaded
Open this post in threaded view
|

Re: ODBC and Access

Jon Peck
You should have the 64-bit drivers.  I think they are installed with Office.  If you see the Access driver listed in sources or can add it, then it is the right driver.  As I said earlier, the symptoms would be different with the wrong bitness.  You would not even see the tables and fields with the wrong driver.

Probably the driver threw an error that wasn't trapped and reported.  Is it possible that the database is password protected?  Or that some field(s) have an unimportable field type?

And what happens if you try to import just one or a few of the variables or import from a different table?  Or try importing from the demo.mdb Access database in the samples\english directory under your Statistics installation to see if the driver is basically working?







On Mon, Nov 26, 2018 at 7:43 AM Maguin, Eugene <[hidden email]> wrote:

I passed both of your (Rick Oliver and Jon Peck) on to our IT person. He just replied that 64 bit versions of Office and spss are installed. The difference in bit size makes sense but here that difference does not seem to be present. But are you saying that the drivers themselves are supplied as 32 bit programs irrespective of whether the installed Office version is 32 or 64? I’m just curious about the interconnection issue. Let me add that I understand about exporting access tables as excel or csv files (and have done that before).

 

Gene Maguin

 

From: Rick Oliver <[hidden email]>
Sent: Wednesday, November 21, 2018 11:58 AM
To: Maguin, Eugene <[hidden email]>
Cc: [hidden email]
Subject: Re: ODBC and Access

 

"Note: If you are running the Windows 64-bit version of IBM® SPSS® Statistics, you cannot read Excel, Access, or dBASE database sources with GET DATA /TYPE=ODBC. The 32-bit ODBC drivers for these products are not compatible. You can, however, read Excel files with GET DATA /TYPE=XLS."

 

 

 

On Wed, Nov 21, 2018 at 10:50 AM Rick Oliver <[hidden email]> wrote:

Probably because you have the 32-bit version of Access/Office and the 64-bit version of SPSS Statistics, and 32-bit Access ODBC driver can't be used by a 64-bit app. The last time I checked, there wasn't a workaround for this.

 

On Wed, Nov 21, 2018 at 10:43 AM Maguin, Eugene <[hidden email]> wrote:

Maybe a question for Jon.

I want read an access database table. I putz through the menu and ‘Finish’. No database table but a nice error.

 

GET DATA

  /TYPE=ODBC

  /CONNECT='DSN=MS Access Database;DBQ=R:\Maguin\TestDatabase.accdb;DriverId=25;FIL=MS '+

    'Access;MaxBufferSize=2048;PageTimeout=5;'

  /SQL='SELECT ID, rid, v1, v2, v3, v4, v5 FROM Test'

  /ASSUMEDSTRWIDTH=255.

 

Error.  Command name: GET DATA

Unknown error

Execution of this command stops.

 

 

A bit of background. In the database wizard, the ‘ODBC Data Sources’, I select ‘MS Access Database’. I click ‘Next’ and the “ODBC Driver Login’ window comes up and I browse to select the database, and OK. The database opens and I select fields and ‘Finish’.

 

Alternatively, since I’m stumbling around in the dark, pick ‘Add ODBC data source’ button, and ‘User Account Control’ box comes up and wants an ODBC administrator login, which I’m not (Our IT manage is mystified by this).

 

So: An explanation please.

 

Thanks, Gene Maguin

===================== To manage your subscription to SPSSX-L, send a message to [hidden email] (not to SPSSX-L), with no body text except the command. To leave the list, send the command SIGNOFF SPSSX-L For a list of commands to manage subscriptions, send the command INFO REFCARD

===================== To manage your subscription to SPSSX-L, send a message to [hidden email] (not to SPSSX-L), with no body text except the command. To leave the list, send the command SIGNOFF SPSSX-L For a list of commands to manage subscriptions, send the command INFO REFCARD


--
Jon K Peck
[hidden email]

===================== To manage your subscription to SPSSX-L, send a message to [hidden email] (not to SPSSX-L), with no body text except the command. To leave the list, send the command SIGNOFF SPSSX-L For a list of commands to manage subscriptions, send the command INFO REFCARD
Reply | Threaded
Open this post in threaded view
|

Re: ODBC and Access

Maguin, Eugene

I do have 64 bit drivers. I can see them when I search (“type here to search”) for ODBC. However, I am not sure where specifically you are looking when you say

see the Access driver listed in sources or can add it

If you mean (with the database wizard box open and MS access database selected) to then click on Next, the ODBC driver login box comes up and I browse for the database to open (and select and open), then OK in same box, select data box opens and move fields over, then Finish. And, …. Wait, wait, there they are!

Try it again without closing spss. Failure! Try again after restarting spss: Failure.

 

I have no idea if he sequence just described is the correct sequence. In terms of ‘operational flow’ seems that after selecting ms access database un the datasources box (data wizard box), I should click Add ODBC data source and when I do a User Account Control  box (Allow this app to make changes to your device Y/N) comes up and wants admin user/password. About an hour ago I had our IT guy simultaneously logged in on my  machine and he signed in on that box and nothing useful happened. Furthermore, I can’t do anything, A yes response demands a username/password. A no response says:

 

The User Account Control feature of Windows has blocked launching of the ODBC Administrator from SPSS Statistics.

Please launch the ODBC Administrator from Control Panel > Administrative Tools > Data Sources(ODBC).

 

Now not able to exit spss. Machine restart required.

 

 

The database is not password protected. The fields are all numeric.

 

 

I just now tried the demo.mdb file you suggested. Import failed with the error I reported last week. I specified just 5 or 6 variables, not the whole file. I then closed spss, restarted and tried to read the all the variables. Same error.

 

Gene Maguin

 

From: SPSSX(r) Discussion <[hidden email]> On Behalf Of Jon Peck
Sent: Monday, November 26, 2018 1:01 PM
To: [hidden email]
Subject: Re: ODBC and Access

 

You should have the 64-bit drivers.  I think they are installed with Office.  If you see the Access driver listed in sources or can add it, then it is the right driver.  As I said earlier, the symptoms would be different with the wrong bitness.  You would not even see the tables and fields with the wrong driver.

 

Probably the driver threw an error that wasn't trapped and reported.  Is it possible that the database is password protected?  Or that some field(s) have an unimportable field type?

 

And what happens if you try to import just one or a few of the variables or import from a different table?  Or try importing from the demo.mdb Access database in the samples\english directory under your Statistics installation to see if the driver is basically working?

 

 

 

 

 

 

 

On Mon, Nov 26, 2018 at 7:43 AM Maguin, Eugene <[hidden email]> wrote:

I passed both of your (Rick Oliver and Jon Peck) on to our IT person. He just replied that 64 bit versions of Office and spss are installed. The difference in bit size makes sense but here that difference does not seem to be present. But are you saying that the drivers themselves are supplied as 32 bit programs irrespective of whether the installed Office version is 32 or 64? I’m just curious about the interconnection issue. Let me add that I understand about exporting access tables as excel or csv files (and have done that before).

 

Gene Maguin

 

From: Rick Oliver <[hidden email]>
Sent: Wednesday, November 21, 2018 11:58 AM
To: Maguin, Eugene <
[hidden email]>
Cc:
[hidden email]
Subject: Re: ODBC and Access

 

"Note: If you are running the Windows 64-bit version of IBM® SPSS® Statistics, you cannot read Excel, Access, or dBASE database sources with GET DATA /TYPE=ODBC. The 32-bit ODBC drivers for these products are not compatible. You can, however, read Excel files with GET DATA /TYPE=XLS."

 

 

 

On Wed, Nov 21, 2018 at 10:50 AM Rick Oliver <[hidden email]> wrote:

Probably because you have the 32-bit version of Access/Office and the 64-bit version of SPSS Statistics, and 32-bit Access ODBC driver can't be used by a 64-bit app. The last time I checked, there wasn't a workaround for this.

 

On Wed, Nov 21, 2018 at 10:43 AM Maguin, Eugene <[hidden email]> wrote:

Maybe a question for Jon.

I want read an access database table. I putz through the menu and ‘Finish’. No database table but a nice error.

 

GET DATA

  /TYPE=ODBC

  /CONNECT='DSN=MS Access Database;DBQ=R:\Maguin\TestDatabase.accdb;DriverId=25;FIL=MS '+

    'Access;MaxBufferSize=2048;PageTimeout=5;'

  /SQL='SELECT ID, rid, v1, v2, v3, v4, v5 FROM Test'

  /ASSUMEDSTRWIDTH=255.

 

Error.  Command name: GET DATA

Unknown error

Execution of this command stops.

 

 

A bit of background. In the database wizard, the ‘ODBC Data Sources’, I select ‘MS Access Database’. I click ‘Next’ and the “ODBC Driver Login’ window comes up and I browse to select the database, and OK. The database opens and I select fields and ‘Finish’.

 

Alternatively, since I’m stumbling around in the dark, pick ‘Add ODBC data source’ button, and ‘User Account Control’ box comes up and wants an ODBC administrator login, which I’m not (Our IT manage is mystified by this).

 

So: An explanation please.

 

Thanks, Gene Maguin

===================== To manage your subscription to SPSSX-L, send a message to [hidden email] (not to SPSSX-L), with no body text except the command. To leave the list, send the command SIGNOFF SPSSX-L For a list of commands to manage subscriptions, send the command INFO REFCARD

===================== To manage your subscription to SPSSX-L, send a message to [hidden email] (not to SPSSX-L), with no body text except the command. To leave the list, send the command SIGNOFF SPSSX-L For a list of commands to manage subscriptions, send the command INFO REFCARD


 

--

Jon K Peck
[hidden email]

===================== To manage your subscription to SPSSX-L, send a message to [hidden email] (not to SPSSX-L), with no body text except the command. To leave the list, send the command SIGNOFF SPSSX-L For a list of commands to manage subscriptions, send the command INFO REFCARD

===================== To manage your subscription to SPSSX-L, send a message to [hidden email] (not to SPSSX-L), with no body text except the command. To leave the list, send the command SIGNOFF SPSSX-L For a list of commands to manage subscriptions, send the command INFO REFCARD
Reply | Threaded
Open this post in threaded view
|

Re: ODBC and Access

Jon Peck
The failure with demo.mdb exonerates your actual database and indicates a problem with ODBC.  The fact that the UAC pops up suggests your system is set up with a high security configuration that is preventing the ODBC process from running - and probably producing the error with no explanation, because the ODBC driver can't get started.  More than you probably want to know about UAC is here.

I would suggest trying to turn off UAC to see if that solves the problem, but you probably don't want to change this permanently.  To do this,
- right click on Start and choose System
- type UAC in the search box
- Lower the setting to never notify
OK
Then start Statistics and try your query.

This a a guess, since I haven't experienced this before or heard about it, but it's easy to try.  It is possible that your user account is set up to prohibit this change, in which case you will need  you sysadmin to help.

Another way to triangulate on this would be to try to use ODBC from Excel.  To do this, 
- start Excel with a blank sheet
- Click Data
- Get Data > From other sources > From ODBC
- Pick Ms Access as the source
- Click Advanced options
- Enter the connection string from your attempt with SPSS:

DSN=MS Access Database;DBQ=R:\Maguin\TestDatabase.accdb;DriverId=25;FIL=MS Access;MaxBufferSize=2048;PageTimeout=5

Note that I omitted the SPSS quotes and +

- Click OK

Enter your logon credentials and click ok.

Again, I don't know what will happen here as I can't try this entirely myself due to the 32/64-bit driver problem.

Note also that Excel can read directly from Access, so, using Excel, you could create an Excel file (Get Data > From Database > From MS Access) and then read that into Statistics without using ODBC.  I was able to get the demo.mdb file into Excel this way.

I'll be interested to see what you find.

On Mon, Nov 26, 2018 at 12:49 PM Maguin, Eugene <[hidden email]> wrote:

I do have 64 bit drivers. I can see them when I search (“type here to search”) for ODBC. However, I am not sure where specifically you are looking when you say

see the Access driver listed in sources or can add it

If you mean (with the database wizard box open and MS access database selected) to then click on Next, the ODBC driver login box comes up and I browse for the database to open (and select and open), then OK in same box, select data box opens and move fields over, then Finish. And, …. Wait, wait, there they are!

Try it again without closing spss. Failure! Try again after restarting spss: Failure.

 

I have no idea if he sequence just described is the correct sequence. In terms of ‘operational flow’ seems that after selecting ms access database un the datasources box (data wizard box), I should click Add ODBC data source and when I do a User Account Control  box (Allow this app to make changes to your device Y/N) comes up and wants admin user/password. About an hour ago I had our IT guy simultaneously logged in on my  machine and he signed in on that box and nothing useful happened. Furthermore, I can’t do anything, A yes response demands a username/password. A no response says:

 

The User Account Control feature of Windows has blocked launching of the ODBC Administrator from SPSS Statistics.

Please launch the ODBC Administrator from Control Panel > Administrative Tools > Data Sources(ODBC).

 

Now not able to exit spss. Machine restart required.

 

 

The database is not password protected. The fields are all numeric.

 

 

I just now tried the demo.mdb file you suggested. Import failed with the error I reported last week. I specified just 5 or 6 variables, not the whole file. I then closed spss, restarted and tried to read the all the variables. Same error.

 

Gene Maguin

 

From: SPSSX(r) Discussion <[hidden email]> On Behalf Of Jon Peck
Sent: Monday, November 26, 2018 1:01 PM
To: [hidden email]
Subject: Re: ODBC and Access

 

You should have the 64-bit drivers.  I think they are installed with Office.  If you see the Access driver listed in sources or can add it, then it is the right driver.  As I said earlier, the symptoms would be different with the wrong bitness.  You would not even see the tables and fields with the wrong driver.

 

Probably the driver threw an error that wasn't trapped and reported.  Is it possible that the database is password protected?  Or that some field(s) have an unimportable field type?

 

And what happens if you try to import just one or a few of the variables or import from a different table?  Or try importing from the demo.mdb Access database in the samples\english directory under your Statistics installation to see if the driver is basically working?

 

 

 

 

 

 

 

On Mon, Nov 26, 2018 at 7:43 AM Maguin, Eugene <[hidden email]> wrote:

I passed both of your (Rick Oliver and Jon Peck) on to our IT person. He just replied that 64 bit versions of Office and spss are installed. The difference in bit size makes sense but here that difference does not seem to be present. But are you saying that the drivers themselves are supplied as 32 bit programs irrespective of whether the installed Office version is 32 or 64? I’m just curious about the interconnection issue. Let me add that I understand about exporting access tables as excel or csv files (and have done that before).

 

Gene Maguin

 

From: Rick Oliver <[hidden email]>
Sent: Wednesday, November 21, 2018 11:58 AM
To: Maguin, Eugene <
[hidden email]>
Cc:
[hidden email]
Subject: Re: ODBC and Access

 

"Note: If you are running the Windows 64-bit version of IBM® SPSS® Statistics, you cannot read Excel, Access, or dBASE database sources with GET DATA /TYPE=ODBC. The 32-bit ODBC drivers for these products are not compatible. You can, however, read Excel files with GET DATA /TYPE=XLS."

 

 

 

On Wed, Nov 21, 2018 at 10:50 AM Rick Oliver <[hidden email]> wrote:

Probably because you have the 32-bit version of Access/Office and the 64-bit version of SPSS Statistics, and 32-bit Access ODBC driver can't be used by a 64-bit app. The last time I checked, there wasn't a workaround for this.

 

On Wed, Nov 21, 2018 at 10:43 AM Maguin, Eugene <[hidden email]> wrote:

Maybe a question for Jon.

I want read an access database table. I putz through the menu and ‘Finish’. No database table but a nice error.

 

GET DATA

  /TYPE=ODBC

  /CONNECT='DSN=MS Access Database;DBQ=R:\Maguin\TestDatabase.accdb;DriverId=25;FIL=MS '+

    'Access;MaxBufferSize=2048;PageTimeout=5;'

  /SQL='SELECT ID, rid, v1, v2, v3, v4, v5 FROM Test'

  /ASSUMEDSTRWIDTH=255.

 

Error.  Command name: GET DATA

Unknown error

Execution of this command stops.

 

 

A bit of background. In the database wizard, the ‘ODBC Data Sources’, I select ‘MS Access Database’. I click ‘Next’ and the “ODBC Driver Login’ window comes up and I browse to select the database, and OK. The database opens and I select fields and ‘Finish’.

 

Alternatively, since I’m stumbling around in the dark, pick ‘Add ODBC data source’ button, and ‘User Account Control’ box comes up and wants an ODBC administrator login, which I’m not (Our IT manage is mystified by this).

 

So: An explanation please.

 

Thanks, Gene Maguin

===================== To manage your subscription to SPSSX-L, send a message to [hidden email] (not to SPSSX-L), with no body text except the command. To leave the list, send the command SIGNOFF SPSSX-L For a list of commands to manage subscriptions, send the command INFO REFCARD

===================== To manage your subscription to SPSSX-L, send a message to [hidden email] (not to SPSSX-L), with no body text except the command. To leave the list, send the command SIGNOFF SPSSX-L For a list of commands to manage subscriptions, send the command INFO REFCARD


 

--

Jon K Peck
[hidden email]

===================== To manage your subscription to SPSSX-L, send a message to [hidden email] (not to SPSSX-L), with no body text except the command. To leave the list, send the command SIGNOFF SPSSX-L For a list of commands to manage subscriptions, send the command INFO REFCARD



--
Jon K Peck
[hidden email]

===================== To manage your subscription to SPSSX-L, send a message to [hidden email] (not to SPSSX-L), with no body text except the command. To leave the list, send the command SIGNOFF SPSSX-L For a list of commands to manage subscriptions, send the command INFO REFCARD
Reply | Threaded
Open this post in threaded view
|

Re: ODBC and Access

Maguin, Eugene

 

>>Another way to triangulate on this would be to try to use ODBC from Excel.  To do this, 

- start Excel with a blank sheet

- Click Data

- Get Data > From other sources > From ODBC

 

The choices now (office 2016) are

            From SQL server

            From analysis services

            From OData data feed

            From XML data import

            From data connection wizard

Choosing this brings up a box with preset kinds of data sources to connect to: ms sql server, ms sql server analysis services, data feed, odbc dsn, ms data access – ole db provider for oracle, and other/advanced. Picking either ms sql server or odbc dsn does not seem to give a place to enter the connection string you give below.

            From Microsoft query

Choosing this brings up Choose data source, with ms access as an option and now choosing that. There’s a ‘Use the query wizard to create/edit queries’ check box that is checked by default.

There is an Options button and clicking that gives a message box labeled Microsoft query with text ‘one or more of the folders in the search path could not be accessed.’ Clicking OK brings up a box labeled Data Source Options. I can put in the path, R:\maguin, and click Add but nothing further happens. 

After choosing ‘ms access database’ and clicking OK, a Select database box comes up and I can select drive/directory and list of access files (only one) comes up. Click OK and query wizard box shows (and now things look like the ‘import data’ sequence from spss. And the data show up.

 

- Pick Ms Access as the source

 

From the

- Click Advanced options

- Enter the connection string from your attempt with SPSS:

DSN=MS Access Database;DBQ=R:\Maguin\TestDatabase.accdb;DriverId=25;FIL=MS Access;MaxBufferSize=2048;PageTimeout=5

Note that I omitted the SPSS quotes and +

- Click OK

Enter your logon credentials and click ok.

 

Again, I don't know what will happen here as I can't try this entirely myself due to the 32/64-bit driver problem.

 

>> Note also that Excel can read directly from Access, so, using Excel, you could create an Excel file (Get Data > From Database > From MS Access) and then read that into Statistics without using ODBC.  I was able to get the demo.mdb file into Excel this way.

 

I can do this also—import rather than export.

 

I'll be interested to see what you find.

 

 

 

 

 

 

 

From: SPSSX(r) Discussion <[hidden email]> On Behalf Of Jon Peck
Sent: Monday, November 26, 2018 3:31 PM
To: [hidden email]
Subject: Re: ODBC and Access

 

The failure with demo.mdb exonerates your actual database and indicates a problem with ODBC.  The fact that the UAC pops up suggests your system is set up with a high security configuration that is preventing the ODBC process from running - and probably producing the error with no explanation, because the ODBC driver can't get started.  More than you probably want to know about UAC is here.

 

I would suggest trying to turn off UAC to see if that solves the problem, but you probably don't want to change this permanently.  To do this,

- right click on Start and choose System

- type UAC in the search box

- Lower the setting to never notify

OK

Then start Statistics and try your query.

 

This a a guess, since I haven't experienced this before or heard about it, but it's easy to try.  It is possible that your user account is set up to prohibit this change, in which case you will need  you sysadmin to help.

 

Another way to triangulate on this would be to try to use ODBC from Excel.  To do this, 

- start Excel with a blank sheet

- Click Data

- Get Data > From other sources > From ODBC

- Pick Ms Access as the source

- Click Advanced options

- Enter the connection string from your attempt with SPSS:

DSN=MS Access Database;DBQ=R:\Maguin\TestDatabase.accdb;DriverId=25;FIL=MS Access;MaxBufferSize=2048;PageTimeout=5

Note that I omitted the SPSS quotes and +

- Click OK

Enter your logon credentials and click ok.

 

Again, I don't know what will happen here as I can't try this entirely myself due to the 32/64-bit driver problem.

 

Note also that Excel can read directly from Access, so, using Excel, you could create an Excel file (Get Data > From Database > From MS Access) and then read that into Statistics without using ODBC.  I was able to get the demo.mdb file into Excel this way.

 

I'll be interested to see what you find.

 

On Mon, Nov 26, 2018 at 12:49 PM Maguin, Eugene <[hidden email]> wrote:

I do have 64 bit drivers. I can see them when I search (“type here to search”) for ODBC. However, I am not sure where specifically you are looking when you say

see the Access driver listed in sources or can add it

If you mean (with the database wizard box open and MS access database selected) to then click on Next, the ODBC driver login box comes up and I browse for the database to open (and select and open), then OK in same box, select data box opens and move fields over, then Finish. And, …. Wait, wait, there they are!

Try it again without closing spss. Failure! Try again after restarting spss: Failure.

 

I have no idea if he sequence just described is the correct sequence. In terms of ‘operational flow’ seems that after selecting ms access database un the datasources box (data wizard box), I should click Add ODBC data source and when I do a User Account Control  box (Allow this app to make changes to your device Y/N) comes up and wants admin user/password. About an hour ago I had our IT guy simultaneously logged in on my  machine and he signed in on that box and nothing useful happened. Furthermore, I can’t do anything, A yes response demands a username/password. A no response says:

 

The User Account Control feature of Windows has blocked launching of the ODBC Administrator from SPSS Statistics.

Please launch the ODBC Administrator from Control Panel > Administrative Tools > Data Sources(ODBC).

 

Now not able to exit spss. Machine restart required.

 

 

The database is not password protected. The fields are all numeric.

 

 

I just now tried the demo.mdb file you suggested. Import failed with the error I reported last week. I specified just 5 or 6 variables, not the whole file. I then closed spss, restarted and tried to read the all the variables. Same error.

 

Gene Maguin

 

From: SPSSX(r) Discussion <[hidden email]> On Behalf Of Jon Peck
Sent: Monday, November 26, 2018 1:01 PM
To: [hidden email]
Subject: Re: ODBC and Access

 

You should have the 64-bit drivers.  I think they are installed with Office.  If you see the Access driver listed in sources or can add it, then it is the right driver.  As I said earlier, the symptoms would be different with the wrong bitness.  You would not even see the tables and fields with the wrong driver.

 

Probably the driver threw an error that wasn't trapped and reported.  Is it possible that the database is password protected?  Or that some field(s) have an unimportable field type?

 

And what happens if you try to import just one or a few of the variables or import from a different table?  Or try importing from the demo.mdb Access database in the samples\english directory under your Statistics installation to see if the driver is basically working?

 

 

 

 

 

 

 

On Mon, Nov 26, 2018 at 7:43 AM Maguin, Eugene <[hidden email]> wrote:

I passed both of your (Rick Oliver and Jon Peck) on to our IT person. He just replied that 64 bit versions of Office and spss are installed. The difference in bit size makes sense but here that difference does not seem to be present. But are you saying that the drivers themselves are supplied as 32 bit programs irrespective of whether the installed Office version is 32 or 64? I’m just curious about the interconnection issue. Let me add that I understand about exporting access tables as excel or csv files (and have done that before).

 

Gene Maguin

 

From: Rick Oliver <[hidden email]>
Sent: Wednesday, November 21, 2018 11:58 AM
To: Maguin, Eugene <
[hidden email]>
Cc:
[hidden email]
Subject: Re: ODBC and Access

 

"Note: If you are running the Windows 64-bit version of IBM® SPSS® Statistics, you cannot read Excel, Access, or dBASE database sources with GET DATA /TYPE=ODBC. The 32-bit ODBC drivers for these products are not compatible. You can, however, read Excel files with GET DATA /TYPE=XLS."

 

 

 

On Wed, Nov 21, 2018 at 10:50 AM Rick Oliver <[hidden email]> wrote:

Probably because you have the 32-bit version of Access/Office and the 64-bit version of SPSS Statistics, and 32-bit Access ODBC driver can't be used by a 64-bit app. The last time I checked, there wasn't a workaround for this.

 

On Wed, Nov 21, 2018 at 10:43 AM Maguin, Eugene <[hidden email]> wrote:

Maybe a question for Jon.

I want read an access database table. I putz through the menu and ‘Finish’. No database table but a nice error.

 

GET DATA

  /TYPE=ODBC

  /CONNECT='DSN=MS Access Database;DBQ=R:\Maguin\TestDatabase.accdb;DriverId=25;FIL=MS '+

    'Access;MaxBufferSize=2048;PageTimeout=5;'

  /SQL='SELECT ID, rid, v1, v2, v3, v4, v5 FROM Test'

  /ASSUMEDSTRWIDTH=255.

 

Error.  Command name: GET DATA

Unknown error

Execution of this command stops.

 

 

A bit of background. In the database wizard, the ‘ODBC Data Sources’, I select ‘MS Access Database’. I click ‘Next’ and the “ODBC Driver Login’ window comes up and I browse to select the database, and OK. The database opens and I select fields and ‘Finish’.

 

Alternatively, since I’m stumbling around in the dark, pick ‘Add ODBC data source’ button, and ‘User Account Control’ box comes up and wants an ODBC administrator login, which I’m not (Our IT manage is mystified by this).

 

So: An explanation please.

 

Thanks, Gene Maguin

===================== To manage your subscription to SPSSX-L, send a message to [hidden email] (not to SPSSX-L), with no body text except the command. To leave the list, send the command SIGNOFF SPSSX-L For a list of commands to manage subscriptions, send the command INFO REFCARD

===================== To manage your subscription to SPSSX-L, send a message to [hidden email] (not to SPSSX-L), with no body text except the command. To leave the list, send the command SIGNOFF SPSSX-L For a list of commands to manage subscriptions, send the command INFO REFCARD


 

--

Jon K Peck
[hidden email]

===================== To manage your subscription to SPSSX-L, send a message to [hidden email] (not to SPSSX-L), with no body text except the command. To leave the list, send the command SIGNOFF SPSSX-L For a list of commands to manage subscriptions, send the command INFO REFCARD


 

--

Jon K Peck
[hidden email]

===================== To manage your subscription to SPSSX-L, send a message to [hidden email] (not to SPSSX-L), with no body text except the command. To leave the list, send the command SIGNOFF SPSSX-L For a list of commands to manage subscriptions, send the command INFO REFCARD

===================== To manage your subscription to SPSSX-L, send a message to [hidden email] (not to SPSSX-L), with no body text except the command. To leave the list, send the command SIGNOFF SPSSX-L For a list of commands to manage subscriptions, send the command INFO REFCARD
Reply | Threaded
Open this post in threaded view
|

Re: ODBC and Access

Jon Peck
When I choose "From ODBC", I see a data source name where I can choose MS Access Database.  Then I click Advanced options, and a box where I can enter the connection string appears (as well as an optional box for an SQL statement).

It is possible that you have a different version of Excel where the interface is a little different, but if it offers ODBC support, it has to have a way to connect to MS Access via a connection string or file box someplace.

On Tue, Nov 27, 2018 at 8:47 AM Maguin, Eugene <[hidden email]> wrote:

 

>>Another way to triangulate on this would be to try to use ODBC from Excel.  To do this, 

- start Excel with a blank sheet

- Click Data

- Get Data > From other sources > From ODBC

 

The choices now (office 2016) are

            From SQL server

            From analysis services

            From OData data feed

            From XML data import

            From data connection wizard

Choosing this brings up a box with preset kinds of data sources to connect to: ms sql server, ms sql server analysis services, data feed, odbc dsn, ms data access – ole db provider for oracle, and other/advanced. Picking either ms sql server or odbc dsn does not seem to give a place to enter the connection string you give below.

            From Microsoft query

Choosing this brings up Choose data source, with ms access as an option and now choosing that. There’s a ‘Use the query wizard to create/edit queries’ check box that is checked by default.

There is an Options button and clicking that gives a message box labeled Microsoft query with text ‘one or more of the folders in the search path could not be accessed.’ Clicking OK brings up a box labeled Data Source Options. I can put in the path, R:\maguin, and click Add but nothing further happens. 

After choosing ‘ms access database’ and clicking OK, a Select database box comes up and I can select drive/directory and list of access files (only one) comes up. Click OK and query wizard box shows (and now things look like the ‘import data’ sequence from spss. And the data show up.

 

- Pick Ms Access as the source

 

From the

- Click Advanced options

- Enter the connection string from your attempt with SPSS:

DSN=MS Access Database;DBQ=R:\Maguin\TestDatabase.accdb;DriverId=25;FIL=MS Access;MaxBufferSize=2048;PageTimeout=5

Note that I omitted the SPSS quotes and +

- Click OK

Enter your logon credentials and click ok.

 

Again, I don't know what will happen here as I can't try this entirely myself due to the 32/64-bit driver problem.

 

>> Note also that Excel can read directly from Access, so, using Excel, you could create an Excel file (Get Data > From Database > From MS Access) and then read that into Statistics without using ODBC.  I was able to get the demo.mdb file into Excel this way.

 

I can do this also—import rather than export.

 

I'll be interested to see what you find.

 

 

 

 

 

 

 

From: SPSSX(r) Discussion <[hidden email]> On Behalf Of Jon Peck
Sent: Monday, November 26, 2018 3:31 PM
To: [hidden email]
Subject: Re: ODBC and Access

 

The failure with demo.mdb exonerates your actual database and indicates a problem with ODBC.  The fact that the UAC pops up suggests your system is set up with a high security configuration that is preventing the ODBC process from running - and probably producing the error with no explanation, because the ODBC driver can't get started.  More than you probably want to know about UAC is here.

 

I would suggest trying to turn off UAC to see if that solves the problem, but you probably don't want to change this permanently.  To do this,

- right click on Start and choose System

- type UAC in the search box

- Lower the setting to never notify

OK

Then start Statistics and try your query.

 

This a a guess, since I haven't experienced this before or heard about it, but it's easy to try.  It is possible that your user account is set up to prohibit this change, in which case you will need  you sysadmin to help.

 

Another way to triangulate on this would be to try to use ODBC from Excel.  To do this, 

- start Excel with a blank sheet

- Click Data

- Get Data > From other sources > From ODBC

- Pick Ms Access as the source

- Click Advanced options

- Enter the connection string from your attempt with SPSS:

DSN=MS Access Database;DBQ=R:\Maguin\TestDatabase.accdb;DriverId=25;FIL=MS Access;MaxBufferSize=2048;PageTimeout=5

Note that I omitted the SPSS quotes and +

- Click OK

Enter your logon credentials and click ok.

 

Again, I don't know what will happen here as I can't try this entirely myself due to the 32/64-bit driver problem.

 

Note also that Excel can read directly from Access, so, using Excel, you could create an Excel file (Get Data > From Database > From MS Access) and then read that into Statistics without using ODBC.  I was able to get the demo.mdb file into Excel this way.

 

I'll be interested to see what you find.

 

On Mon, Nov 26, 2018 at 12:49 PM Maguin, Eugene <[hidden email]> wrote:

I do have 64 bit drivers. I can see them when I search (“type here to search”) for ODBC. However, I am not sure where specifically you are looking when you say

see the Access driver listed in sources or can add it

If you mean (with the database wizard box open and MS access database selected) to then click on Next, the ODBC driver login box comes up and I browse for the database to open (and select and open), then OK in same box, select data box opens and move fields over, then Finish. And, …. Wait, wait, there they are!

Try it again without closing spss. Failure! Try again after restarting spss: Failure.

 

I have no idea if he sequence just described is the correct sequence. In terms of ‘operational flow’ seems that after selecting ms access database un the datasources box (data wizard box), I should click Add ODBC data source and when I do a User Account Control  box (Allow this app to make changes to your device Y/N) comes up and wants admin user/password. About an hour ago I had our IT guy simultaneously logged in on my  machine and he signed in on that box and nothing useful happened. Furthermore, I can’t do anything, A yes response demands a username/password. A no response says:

 

The User Account Control feature of Windows has blocked launching of the ODBC Administrator from SPSS Statistics.

Please launch the ODBC Administrator from Control Panel > Administrative Tools > Data Sources(ODBC).

 

Now not able to exit spss. Machine restart required.

 

 

The database is not password protected. The fields are all numeric.

 

 

I just now tried the demo.mdb file you suggested. Import failed with the error I reported last week. I specified just 5 or 6 variables, not the whole file. I then closed spss, restarted and tried to read the all the variables. Same error.

 

Gene Maguin

 

From: SPSSX(r) Discussion <[hidden email]> On Behalf Of Jon Peck
Sent: Monday, November 26, 2018 1:01 PM
To: [hidden email]
Subject: Re: ODBC and Access

 

You should have the 64-bit drivers.  I think they are installed with Office.  If you see the Access driver listed in sources or can add it, then it is the right driver.  As I said earlier, the symptoms would be different with the wrong bitness.  You would not even see the tables and fields with the wrong driver.

 

Probably the driver threw an error that wasn't trapped and reported.  Is it possible that the database is password protected?  Or that some field(s) have an unimportable field type?

 

And what happens if you try to import just one or a few of the variables or import from a different table?  Or try importing from the demo.mdb Access database in the samples\english directory under your Statistics installation to see if the driver is basically working?

 

 

 

 

 

 

 

On Mon, Nov 26, 2018 at 7:43 AM Maguin, Eugene <[hidden email]> wrote:

I passed both of your (Rick Oliver and Jon Peck) on to our IT person. He just replied that 64 bit versions of Office and spss are installed. The difference in bit size makes sense but here that difference does not seem to be present. But are you saying that the drivers themselves are supplied as 32 bit programs irrespective of whether the installed Office version is 32 or 64? I’m just curious about the interconnection issue. Let me add that I understand about exporting access tables as excel or csv files (and have done that before).

 

Gene Maguin

 

From: Rick Oliver <[hidden email]>
Sent: Wednesday, November 21, 2018 11:58 AM
To: Maguin, Eugene <
[hidden email]>
Cc:
[hidden email]
Subject: Re: ODBC and Access

 

"Note: If you are running the Windows 64-bit version of IBM® SPSS® Statistics, you cannot read Excel, Access, or dBASE database sources with GET DATA /TYPE=ODBC. The 32-bit ODBC drivers for these products are not compatible. You can, however, read Excel files with GET DATA /TYPE=XLS."

 

 

 

On Wed, Nov 21, 2018 at 10:50 AM Rick Oliver <[hidden email]> wrote:

Probably because you have the 32-bit version of Access/Office and the 64-bit version of SPSS Statistics, and 32-bit Access ODBC driver can't be used by a 64-bit app. The last time I checked, there wasn't a workaround for this.

 

On Wed, Nov 21, 2018 at 10:43 AM Maguin, Eugene <[hidden email]> wrote:

Maybe a question for Jon.

I want read an access database table. I putz through the menu and ‘Finish’. No database table but a nice error.

 

GET DATA

  /TYPE=ODBC

  /CONNECT='DSN=MS Access Database;DBQ=R:\Maguin\TestDatabase.accdb;DriverId=25;FIL=MS '+

    'Access;MaxBufferSize=2048;PageTimeout=5;'

  /SQL='SELECT ID, rid, v1, v2, v3, v4, v5 FROM Test'

  /ASSUMEDSTRWIDTH=255.

 

Error.  Command name: GET DATA

Unknown error

Execution of this command stops.

 

 

A bit of background. In the database wizard, the ‘ODBC Data Sources’, I select ‘MS Access Database’. I click ‘Next’ and the “ODBC Driver Login’ window comes up and I browse to select the database, and OK. The database opens and I select fields and ‘Finish’.

 

Alternatively, since I’m stumbling around in the dark, pick ‘Add ODBC data source’ button, and ‘User Account Control’ box comes up and wants an ODBC administrator login, which I’m not (Our IT manage is mystified by this).

 

So: An explanation please.

 

Thanks, Gene Maguin

===================== To manage your subscription to SPSSX-L, send a message to [hidden email] (not to SPSSX-L), with no body text except the command. To leave the list, send the command SIGNOFF SPSSX-L For a list of commands to manage subscriptions, send the command INFO REFCARD

===================== To manage your subscription to SPSSX-L, send a message to [hidden email] (not to SPSSX-L), with no body text except the command. To leave the list, send the command SIGNOFF SPSSX-L For a list of commands to manage subscriptions, send the command INFO REFCARD


 

--

Jon K Peck
[hidden email]

===================== To manage your subscription to SPSSX-L, send a message to [hidden email] (not to SPSSX-L), with no body text except the command. To leave the list, send the command SIGNOFF SPSSX-L For a list of commands to manage subscriptions, send the command INFO REFCARD


 

--

Jon K Peck
[hidden email]

===================== To manage your subscription to SPSSX-L, send a message to [hidden email] (not to SPSSX-L), with no body text except the command. To leave the list, send the command SIGNOFF SPSSX-L For a list of commands to manage subscriptions, send the command INFO REFCARD



--
Jon K Peck
[hidden email]

===================== To manage your subscription to SPSSX-L, send a message to [hidden email] (not to SPSSX-L), with no body text except the command. To leave the list, send the command SIGNOFF SPSSX-L For a list of commands to manage subscriptions, send the command INFO REFCARD