>Hi all-
>
>I'm trying to use an odbc connection to get to spss data. Here's the code:
>
>local lnhandle,lcSQL,lnReturn
>lnHandle=sqlconnect('spssdata') &&spssdata is dsn (driver is for *.sav files)
>lcSql="select * from e:\spss\cgstuff\salesdata" &&salesdata.sav is spss file
>lnReturn=sqlexec(lnHandle,lcSQL,'xCursor')
>
>SqlExec never succeeds (lnReturn is always -1). Here's snippet from the sql log:
>
>VFP6 ab:aa EXIT SQLExecDirect with return code -1 (SQL_ERROR)
> HSTMT 0x023766b0
> UCHAR * 0x01f514c0 [ -3] "select * from e:\spss\cgstuff\salesdata\ 0"
> SDWORD -3
>
> DIAG [S0000] [SPSS Inc.][SPSS ODBC Driver][IODLL]I/O DLL error (4)
>
>Can anyone give me an interpretation?
>
The system cannot open the specified file. Try adding the .SAV extension explicitly.