SqlDateTime overflow when running procedure

P

poppy

I set up my parameters in code as follows :
Code:
lTTState.startDate = Today.AddDays(-10)
lTTState.startDate = Today
lSqlCmd.Parameters.Add(New
SqlParameter("@startDate", SqlDbType.DateTime))
lSqlCmd.Parameters("@startDate").Value =
lTTState.startDate
lSqlCmd.Parameters.Add(New SqlParameter("@endDate",
SqlDbType.DateTime))
lSqlCmd.Parameters("@endDate").Value = lTTState.endDate

My dates are declared as datetime in the procedure.

When I run the application I get the following error :

SqlDateTime overflow. Must be between 1/1/1753 12:00:00 AM
and 12/31/9999 11:59:59 PM.

Any Ideas ?
 
L

Lars-Erik Aabech

What exactly is the values of lTTState.startDate and lTTState.endDate?

Lars-Erik
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,744
Messages
2,569,483
Members
44,901
Latest member
Noble71S45

Latest Threads

Top