Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I'm using ADO withing Excel to connect to a CSV file.
My connection works: 'Where fpath is the folder where the csv file resides cn.Open _ "Driver={Microsoft Text Driver (*.txt; *.csv)};" & _ "Dbq=" & fpath & ";" & _ "Extensions=asc,csv,tab,txt" This query works: sql = "SELECT COUNT(F9) FROM filename.csv" But when I add a WHERE clause: sql = "SELECT COUNT(F9) FROM filename.csv WHERE F7 = 390" I get the error "Too few parameters. Expected 1." What can I do different to make this work? tod |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
MS Query Problem | Excel Programming | |||
VBA ADO SQL Query Problem | Excel Programming | |||
Problem with MS Query - can't edit query | Excel Discussion (Misc queries) | |||
Problem with .Background Query option of ODBC Query | Excel Programming |