J
JR
I'll start off by saying I'm very new to VS2005 and the DB tools. I am
developing an app for Mobile 6 using SQL CE.
I have a table with a datetime field and I want to be able to query this
table for a given year. I have designed a query in the table's tableadapter
with the following SQL statement:
select date, ...
from table
where datepart(year, date) = @param1
When my code runs the FillBy method of the tableadapter it returns an
exception stating that there was an error parsing the query (basically the
"(" in line 3 of the sql statement is the culprit token).
I guess the question are:
Can I filter by year of a datetime field?
Is this a limitation of SQL CE?
Am I doing something wrong?
Thanks,
Jeremy
developing an app for Mobile 6 using SQL CE.
I have a table with a datetime field and I want to be able to query this
table for a given year. I have designed a query in the table's tableadapter
with the following SQL statement:
select date, ...
from table
where datepart(year, date) = @param1
When my code runs the FillBy method of the tableadapter it returns an
exception stating that there was an error parsing the query (basically the
"(" in line 3 of the sql statement is the culprit token).
I guess the question are:
Can I filter by year of a datetime field?
Is this a limitation of SQL CE?
Am I doing something wrong?
Thanks,
Jeremy