Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
No value given for one or more required parameters
Message
General information
Forum:
ASP.NET
Category:
Coding, syntax and commands
Title:
No value given for one or more required parameters
Miscellaneous
Thread ID:
01429969
Message ID:
01429969
Views:
94
Using C#. I'm trying to run a SQL against an Excel file. I'm getting the error "no value given for one or more required parameters". I have been Googling this all day and can't get it to work.

This throws the error:
string Query = "SELECT [TPMA Run Date],[Buyer],[Item],[PO Number],[PO Line],[PO Due Date],[Date Required]," +
                "[New Date],[Status Comment],[Status Code],[Prior Week New Date],[Prior Week Status]," +
                "[Prior Week Status Code],[SEQNUM] FROM [Current MRP Action Messages$]";
If I do
string Query = "SELECT * FROM [Current MRP Action Messages$]";
then it works fine. I have checked the column headers in Excel. They are correct.

My conn string:
ConnectionString = @"provider=Microsoft.Jet.OLEDB.4.0;Data Source=" + FileName + ";Extended Properties=\"Excel 8.0;HDR=NO;IMEX=1\"";
Everything makes sense in someone's mind
public class SystemCrasher :ICrashable
In addition, an integer field is not for irrational people
Reply
Map
View

Click here to load this message in the networking platform