I
Irishmaninusa
Hello,
I am using ADO to query the contents of an excel spreadsheet, and I have
worksheet called WS_1 and there is a number of columns in the spreadsheet. I
want to be able to sort on the product column and I am getting an error
message saying
Too few parameters, Expected 1.
This is how I am connecting to the spreadsheet
'Set the connection string
strConn = "DRIVER=Microsoft Excel Driver
(*.xls);DriverId=790;ReadOnly=True;" & "DBQ=" & strFile
'Open the recordset
.Open strSql, strConn
And this is the select statement I am passing into the spreadsheet
SELECT * FROM [WS_1$] ORDER BY Product
If I use SELECT * FROM [WS_1$] then it doesn't give any errors, but as soon
as I add the order by clause then it gives me errors.
I am using Excel 2000 SP3.
Any help would be appreciated. Thanks.
JD
I am using ADO to query the contents of an excel spreadsheet, and I have
worksheet called WS_1 and there is a number of columns in the spreadsheet. I
want to be able to sort on the product column and I am getting an error
message saying
Too few parameters, Expected 1.
This is how I am connecting to the spreadsheet
'Set the connection string
strConn = "DRIVER=Microsoft Excel Driver
(*.xls);DriverId=790;ReadOnly=True;" & "DBQ=" & strFile
'Open the recordset
.Open strSql, strConn
And this is the select statement I am passing into the spreadsheet
SELECT * FROM [WS_1$] ORDER BY Product
If I use SELECT * FROM [WS_1$] then it doesn't give any errors, but as soon
as I add the order by clause then it gives me errors.
I am using Excel 2000 SP3.
Any help would be appreciated. Thanks.
JD