This is a migrated thread and some comments may be shown as answers.

[Solved] Date Filtering Error - SqlDateTime overflow

0 Answers 77 Views
Grid
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
ren
Top achievements
Rank 1
ren asked on 19 Mar 2011, 07:05 AM

I'm trying to use custom ajax binding (like demo sampe)
Everithing is ok, but DateTime filtering doesn't work (SqlDateTime overflow. Must be between 1/1/1753 12:00:00 AM and 12/31/9999 11:59:59 PM.)
But demo sample works fine :)

I noticed the difference between generated  T-Sql in WHERE block
in Demo sample:
WHERE (
    (CASE
        WHEN 1 = 1 THEN [t0].[OrderDate]
        ELSE NULL
     END)) < @p0

in My project:
WHERE (
    (CASE
        WHEN 1 = 1 THEN [t0].[postDate]
        ELSE @p0
     END)) = @p1

Why there are 2 params in my project, and only 1 param in demo sample?
Tags
Grid
Asked by
ren
Top achievements
Rank 1
Share this question
or