importing TPS database

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

importing TPS database

Andy W
I've recently started a new job, and the database I need to query are a series of Topspeed (.TPS) files. I have the necessary ODBC drivers on my machine, but when I try to use the SPSS wizard to generate the query nothing happens. Attached is the screen I get to, and when I click on the next button nothing happens.

The previous analysts were simply importing all of the needed tables into access, and then querying the access database. Any ability to do this directly in SPSS would be much appreciated, as I know how to automate that process (my skills in access are too limited to automate that process though, and it should be superflous since SPSS should be able to grab the data directly).

I highly suspect this is not enough information help, but I figured it would not hurt to query the list to see if anybody had anything insightful to say ;) If it matters, both the ODBC drivers (1999) and the version of SPSS I am using (15) are quite old. Any advice is appreciated,

Andy

Andy W
apwheele@gmail.com
http://andrewpwheeler.wordpress.com/
Reply | Threaded
Open this post in threaded view
|

Automatic reply: importing TPS database

Valerie Villella
Thank you for your email.

I am off-site at a conference with limited access to my email. I will be returning to the office on Wednesday September 12. If you need immediate assistance please contact Nina Zivkovic at [hidden email] or at 905-851-8821, ext. 246.

Thank you.

Valerie Villella
Education Coordinator &
Policy and Program Analyst

=====================
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: importing TPS database

Jon K Peck
In reply to this post by Andy W
I am not familiar with Topspeed, but hunting around suggests that it is very old.  Although it apparently has an ODBC driver, it might not be up to current standards.  Or it may simply be that the ODBC driver is configured incorrectly.  You might want to try bypassing the DB wizard and just running a GET DATA command from syntax.

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




From:        Andy W <[hidden email]>
To:        [hidden email]
Date:        09/07/2012 01:31 PM
Subject:        [SPSSX-L] importing TPS database
Sent by:        "SPSSX(r) Discussion" <[hidden email]>




I've recently started a new job, and the database I need to query are a
series of Topspeed (.TPS) files. I have the necessary ODBC drivers on my
machine, but when I try to use the SPSS wizard to generate the query nothing
happens. Attached is the screen I get to, and when I click on the next
button nothing happens.

The previous analysts were simply importing all of the needed tables into
access, and then querying the access database. Any ability to do this
directly in SPSS would be much appreciated, as I know how to automate that
process (my skills in access are too limited to automate that process
though, and it should be superflous since SPSS should be able to grab the
data directly).

I highly suspect this is not enough information help, but I figured it would
not hurt to query the list to see if anybody had anything insightful to say
;) If it matters, both the ODBC drivers (1999) and the version of SPSS I am
using (15) are quite old. Any advice is appreciated,

Andy

http://spssx-discussion.1045642.n5.nabble.com/file/n5714981/image.jpg



-----
Andy W
[hidden email]
http://andrewpwheeler.wordpress.com/
--
View this message in context:
http://spssx-discussion.1045642.n5.nabble.com/importing-TPS-database-tp5714981.html
Sent from the SPSSX Discussion mailing list archive at Nabble.com.

=====================
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: importing TPS database

Andy W

Thank you, I'm a little lost about how to figure out what goes on the CONNECT statement (all the help says is to generate it through the wizard). Below is the example of my code for pulling the table after it is dumped into Access.


GET DATA /TYPE=ODBC /CONNECT=
 'DSN=MS Access Database;DBQ=C:\Documents and'+
 ' Settings\andrew.wheeler\Desktop\Data_Dumps\test_run\ODBC.mdb;DriverId=25;'
  'FIL=MS Access;MaxBufferSize=2048;PageTimeout=5;'
 /SQL = 'SELECT  DEPTNO,  `YEAR`,  INCDNO,  SEQNO,  STATEUCR,  OFFENSESEVR, '+
 ' DISPDATE,  OFFENSEDISPDATE,  MOTIVE,  STATEDISP,  '
  'ATEMPTCOMMIT,  THEFTCOMP,  DRUGRELATED,  ALCOHOLRELATED,  STATEUCRNO, '+
 ' SPECIALMO,  CLEAREDTYPE,  CLEAREDDATE,  CLEAREDBY,'
  '  ARRESTEDNO,  CRIMINALACTV1,  CRIMINALACTV2,  CRIMINALACTV3,  LARCENYTYPE'+
 ',  ARSON,  COERSION,  DOMESTICV,  HATECRIME,  '
  'DOCUMENT,  WEAPONS,  UNOCC,  LOCALSTATE,  CLASSTYPE,  REVIEWDATE, '+
 ' LOCTYPE1,  LOCTYPE2,  VEHENTRYMETHOD,  USEOFFORCE,  '
  'USEOFFORCEFILED,  CHILDSTATUS,  OFFICERACTION,  PRIORCOURTORD,  HOWENTRY, '+
 ' HOWEXIT,  FORCEDENTRY,  NOFORCE,  '
  'ATTEMPTFORCE,  NOPREMENT,  OCCUPANCY,  RACIAL,  ETHNIC,  RELIGIOUS, '+
 ' SEXUAL,  TBA,  CHKA,  CHKB,  CHKC,  TBB,  NOA,  '
  'CHKD,  DTA,  TBC,  CHKE,  ARSVAL,  WEAPUSE1,  WEAPUSE2,  WEAPUSE3, '+
 ' HOWENTRY2,  HOWEXIT2,  SECURITY1,  SECURITY2,  '
  'TOOLSUSED1,  TOOLSUSED2,  EVDOBTAINED,  NIBRSRPT,  GANGACT,  GANGTYPE1, '+
 ' GANGNAME1,  GANGTYPE2,  GANGNAME2,  HOMEINV,  '
  'CAMPUS,  REFERRAL1,  REFERRAL2,  REFERRAL3,  REFERRAL4,  REFERRAL5, '+
 ' REFERRAL6,  TARGET,  NOUSE1,  NOUSE2,  NOUSE3,  '
  'NOUSE4,  NOUSE5,  NOUSE6,  NOUSE7,  NOUSE8,  NOUSE9,  NOUSE10,  USER1, '+
 ' USER2,  USER3,  USER4,  USER5,  USER6,  USER7,  '
  'USER8,  USER9,  USER10,  UNSTRING1,  UNSTRING2,  UNSTRING3,  UNSTRING4, '+
 ' UNSTRING5,  COMMENT FROM  OFFENSE'
 /ASSUMEDSTRWIDTH=255
 .
CACHE.  //May be removed but insures data integrity.
DATASET NAME offense WINDOW=FRONT.

I have alot of questions about what goes into that connect statement, but lets just start with a few. What do I put down for "DBQ"? The file is not all rolled up into one like an access database, but is a series of .TPS tables in one directory. Do I put the directory and use a from statement in SQL, or point to that exact table file? How do I figure out the DriverID? Or am I completely off base and I need to read up on how to make SQL queries?

In my few attempts I have been given a warning ">Warning. Command name: GET DATA >[TopSpeed Corp.][TopSpeed ODBC Driver]Driver not capable". Is this significant in that I won't be able to query the data correctly within SPSS, or could it be simply the product of a bad get statement?

Thanks for all the help again, Andy

Andy W
apwheele@gmail.com
http://andrewpwheeler.wordpress.com/
Reply | Threaded
Open this post in threaded view
|

Re: importing TPS database

Jon K Peck
This won't help, I suspect, with the CONNECT string you need for direct access.

There is some possibly discouraging information at
http://www.tek-tips.com/viewthread.cfm?qid=1480840

This link shows some TPS connection strings
http://books.google.com/books?id=IuqjXNoEJhwC&pg=PA111&lpg=PA111&dq=TPS+connect+string&source=bl&ots=dYYPVE4W0d&sig=BJ1pgu4DyheTC9JVUfDF_HNCxIQ&hl=en#v=onepage&q=TPS%20connect%20string&f=false

HTH,

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




From:        Andy W <[hidden email]>
To:        [hidden email]
Date:        09/10/2012 08:38 AM
Subject:        Re: [SPSSX-L] importing TPS database
Sent by:        "SPSSX(r) Discussion" <[hidden email]>




Thank you, I'm a little lost about how to figure out what goes on the CONNECT statement (all the help says is to generate it through the wizard). Below is the example of my code for pulling the table after it is dumped into Access.


GET DATA /TYPE=ODBC /CONNECT=
'DSN=MS Access Database;DBQ=C:\Documents and'+
' Settings\andrew.wheeler\Desktop\Data_Dumps\test_run\ODBC.mdb;DriverId=25;'
 'FIL=MS Access;MaxBufferSize=2048;PageTimeout=5;'
/SQL = 'SELECT  DEPTNO,  `YEAR`,  INCDNO,  SEQNO,  STATEUCR,  OFFENSESEVR, '+
' DISPDATE,  OFFENSEDISPDATE,  MOTIVE,  STATEDISP,  '
 'ATEMPTCOMMIT,  THEFTCOMP,  DRUGRELATED,  ALCOHOLRELATED,  STATEUCRNO, '+
' SPECIALMO,  CLEAREDTYPE,  CLEAREDDATE,  CLEAREDBY,'
 '  ARRESTEDNO,  CRIMINALACTV1,  CRIMINALACTV2,  CRIMINALACTV3,  LARCENYTYPE'+
',  ARSON,  COERSION,  DOMESTICV,  HATECRIME,  '
 'DOCUMENT,  WEAPONS,  UNOCC,  LOCALSTATE,  CLASSTYPE,  REVIEWDATE, '+
' LOCTYPE1,  LOCTYPE2,  VEHENTRYMETHOD,  USEOFFORCE,  '
 'USEOFFORCEFILED,  CHILDSTATUS,  OFFICERACTION,  PRIORCOURTORD,  HOWENTRY, '+
' HOWEXIT,  FORCEDENTRY,  NOFORCE,  '
 'ATTEMPTFORCE,  NOPREMENT,  OCCUPANCY,  RACIAL,  ETHNIC,  RELIGIOUS, '+
' SEXUAL,  TBA,  CHKA,  CHKB,  CHKC,  TBB,  NOA,  '
 'CHKD,  DTA,  TBC,  CHKE,  ARSVAL,  WEAPUSE1,  WEAPUSE2,  WEAPUSE3, '+
' HOWENTRY2,  HOWEXIT2,  SECURITY1,  SECURITY2,  '
 'TOOLSUSED1,  TOOLSUSED2,  EVDOBTAINED,  NIBRSRPT,  GANGACT,  GANGTYPE1, '+
' GANGNAME1,  GANGTYPE2,  GANGNAME2,  HOMEINV,  '
 'CAMPUS,  REFERRAL1,  REFERRAL2,  REFERRAL3,  REFERRAL4,  REFERRAL5, '+
' REFERRAL6,  TARGET,  NOUSE1,  NOUSE2,  NOUSE3,  '
 'NOUSE4,  NOUSE5,  NOUSE6,  NOUSE7,  NOUSE8,  NOUSE9,  NOUSE10,  USER1, '+
' USER2,  USER3,  USER4,  USER5,  USER6,  USER7,  '
 'USER8,  USER9,  USER10,  UNSTRING1,  UNSTRING2,  UNSTRING3,  UNSTRING4, '+
' UNSTRING5,  COMMENT FROM  OFFENSE'
/ASSUMEDSTRWIDTH=255
.
CACHE.  //May be removed but insures data integrity.
DATASET NAME offense WINDOW=FRONT.

I have alot of questions about what goes into that connect statement, but lets just start with a few. What do I put down for "DBQ"? The file is not all rolled up into one like an access database, but is a series of .TPS tables in one directory. Do I put the directory and use a from statement in SQL, or point to that exact table file? How do I figure out the DriverID? Or am I completely off base and I need to read up on how to make SQL queries?

In my few attempts I have been given a warning ">Warning. Command name: GET DATA >[TopSpeed Corp.][TopSpeed ODBC Driver]Driver not capable". Is this significant in that I won't be able to query the data correctly within SPSS, or could it be simply the product of a bad get statement?

Thanks for all the help again, Andy

Andy W
[hidden email]

http://andrewpwheeler.wordpress.com/


View this message in context: Re: importing TPS database
Sent from the
SPSSX Discussion mailing list archive at Nabble.com.
Reply | Threaded
Open this post in threaded view
|

Re: importing TPS database

Andy W
In a happy conclusion to this thread (I'm quite happy at least), my current solution is to create a set of linked tables in Access, and then query the linked tables from the Access Database. I thought for awhile that the linked tables were just snap-shots, and I had to "refresh" the links whenever I wanted to update the data, but I just figured out that is not the case. Which I'm very glad, I was not looking forward to versing myself in the necessary VBA to be able to automate the refreshing from within Access. It is only a one time pain as well, once the table is linked it is there forever in the Access database.

The closest I could get to a valid connect string was taking what Access used to produce a valid SQL "pass through" query, "DSN=Emergitech System DSN;DBQ=I:\ITWIN\DATA\;Extension=tps;Oem=N;SERVER=NotTheServer;", but I still received the same error message that the Driver not capable.

Not sure what is up with the "SERVER=NotTheServer" portion, reminds me a bit of that Rene Magritte painting.

Andy
Andy W
apwheele@gmail.com
http://andrewpwheeler.wordpress.com/