0

I am creating a application which is having database as MSACCESS. one of the column name in the database is "Date", when i try to read the column using C# CODE its says "No value given for one or more required parameter"

    SELECT [DATE] FROM TABLE1

Is there any way we read the reserved keyword columns in c# coding.

please help

3
  • 1. Does TABLE1 really have field named DATE. 2. Try full name: SELECT TABLE1.[DATE] FROM TABLE1 3. use alias SELECT TABLE1.[DATE] as [BadlyNamedColumn] FROM TABLE1 4. May be error in your C# code? Commented Apr 16, 2014 at 9:12
  • Yes the Date column exist in Table1 Commented Apr 16, 2014 at 9:15
  • SELECT [DATE] FROM TABLE1 is a valid query. If you want us to help you then you'll need to edit your question and tell us what you are actually doing. Commented Apr 16, 2014 at 14:54

1 Answer 1

2

"No value given for one or more required parameter"

This is generated because you are not passing parameters properly to query.

For example

"select name from table where name="+abc+";

this kind of thing generate this problem as ' ' are missing.

Or you are providing less parameters in query for prepared statement. (there may be some other reasons)

Please check.

Because I don't find anything wrong with this

SELECT [Date] FROM TABLE1
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.