Error source:Microsoft Jet Database Engine
Error Message:Undefined function '[Year]' in expression
please note it adds [ ] Brakets to year
Than that's the problem: the adding of brackets to "Year" makes it a column identifier instead of a function name.
Are you passing that SQL statement to Access via a OleDbCommand object? And if so, can you please paste that code here?
The sql statement is as I stated earlier
Year([Created_Date]) in the query grid
But you said, "please note it adds [ ] Brakets to year"
That means it looks like this: [Year]([Created_Date])
Or like this: [Year([Created_Date])]
Correct? Or does it add the brackets ONLY to the error message and NOT to the query itself?
That means it looks like this: [Year]([Created_Date]
It adds it to query grid and error message as well.
Than that's the problem: the adding of brackets to "Year" makes it a column identifier instead of a function name.
So the question is why does it added and cannot evaluate
Year([Created_Date])
I just try it on the same table in access and it works well
Are you passing that SQL statement to Access via a OleDbCommand object? And if so, can you please paste that code here?
I have the same problem. Did you find a solution?
To work around this bug I'm going to make the query in the access mdb file that calculates and lists in columbs the Year, Month and Day. Then I'll set the SQLDataSource to use that view of the data instead of the table directly. However, there should be a way to use functions inside of the query designer build into the express.
No comments:
Post a Comment