From: Tom on
Hi, I've got a problem. I'm trying to add DateTime object to parameters list
of a SqlCeCommand,
I write in vs2005 this:

DataTable dt = new DataTable();

SqlCeCommand cmd = new SqlCeCommand();
cmd.Parameters.Add(new SqlCeParameter("@my_date", my_date);
cmd.connection = con;

//DATE is a birthdays table column, type: datetime
cmd.CommandText = "select * from birthdays where DATE <= @my_date";

SqlCeDataAdapter da = new SqlCeDataAdapter(cmd);
da.Fill(dt); //EXCEPTION
da.Dispose();

I get an exception:

An overflow occurred while converting to datetime.

What is wrong? Could you help me, please? Can't "google" nothing :(