Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
What is wrong with this SQL Select?
Message
General information
Forum:
Visual FoxPro
Category:
Other
Environment versions
Visual FoxPro:
VFP 9 SP1
Miscellaneous
Thread ID:
01556973
Message ID:
01557009
Views:
87
>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' ?
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform