0

can anyone tell me why this query throws an error "No value given for one or more required parameters."

Select Status from [Viewer$] WHERE SlNo-Viewer < 4 ... I'm trying to query an excel file and this query is not working with that....Please help....

4
  • Are you sure the problem is with the query, not how you are performing the query? i.e. the C# code around it Commented Mar 24, 2011 at 7:49
  • Yes i think...because the query is working fine when i'm searching for a text. Commented Mar 24, 2011 at 7:57
  • So why did you tag it C#? Please remove the tag if it's not relevant to the problem. Commented Mar 24, 2011 at 8:17
  • I'm using the query with C# code that's why i tagged it with C# Commented Mar 24, 2011 at 8:21

1 Answer 1

2

If SlNo-Viewer is name of a single field, the minus character in the field name is interpreted as the minus operator and it's trying to subtract field called Viewer from field called Slno.

Try this instead:

Select [Status] from [Viewer$] WHERE [SlNo-Viewer] < 4
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.