Friday, 6 September 2013

GETDATE() throwing exception

GETDATE() throwing exception

I am creating a simple application where i am using MSAccess as database.
When i am trying to retrieve the data using below query - i am getting
exception undefined function GETDATE()
select *
from tempdata
where dateissue between DATEADD(MM, DATEDIFF(MM, 0, GETDATE()) - 0 , 0)
and DATEADD(MM, DATEDIFF(MM, 0, GETDATE()) + 1, - 1 )
can't we use the sql inbuilt methods inside c# code ?? if so how do i
solve this problem

No comments:

Post a Comment