0

I am trying to execute a query against a CSV file using OleDbConnection, OleDbCommand and the Microsoft.Jet.OLEDB.4.0 driver but keep getting an exception saying no value given for one or more required parameters. I suspect the problem is in the SQL query syntax (I am trying to use the same queries I use with SQL Server) but I can find no manual to check it (another thing I would like to know is how exactly to address the columns if there is no header in the CSV file). Do you happen to know where is the SQL dialect I need described?

Ivan
  • 63,011
  • 101
  • 250
  • 382
  • you will need to post the source code that you are using, for us to look at it. Connection, Command, SQL and execute. tkx – donPablo Apr 14 '14 at 05:02
  • I don't ask you to debug my code, @donPablo, all I want is a link to the particular SQL dialect reference. – Ivan Apr 14 '14 at 13:03

1 Answers1

2

Jet 4.0 uses a dialect based on ANSI SQL 92. Source: http://support.microsoft.com/kb/275561/en

Regarding the exception, your wondering of how to address columns is probably related, particularly if you have a WHERE clause checking a value in a column. If there is no header row, and the connection string has "HDR=NO" in the Extended Properties, you need to refer to the columns as F1, F2, F3, and so on in order from left to right. Source: http://support.microsoft.com/kb/316934

Muqo
  • 414
  • 7
  • 15
  • I indeed do have a WHERE clause but I have tried using a headered file and "HDR=Yes" with no luck. Actually I haven't tried doing it without a header (though it would be preferable in my case) because I had no idea about how to address the columns in this case at all. – Ivan Apr 14 '14 at 13:05