>Hi,
>
>When I connect from a test vfp program to an Excel spreadsheet file (via ODBC driver) using the following syntax:
>
>
>cSqlSelect = 'SELECT A,B FROM "SHEET1$" WHERE 1=1'
>nResult = SQLEXEC( m.lnSQL, cSqlSelect, m.TempAlias )
>
>
>The error is "Too few parameters. Expected 2". Note that m.lnSQL has a valid handle (1) upon connecting to the Excel file.
>
>What is the 2nd parameter I am missing? TIA.
Hi Dmitry
What are A,B in your query? Probably ODBC driver is looking for field names that are supposed to be in the very first row. What field names are you getting for 'SELECT * FROM "SHEET1$" WHERE 1=1' ?