I'm surprised that doesn't work (although I've not used SqlServerCe, it may be quirky). Have you tried using a SqlDataAdapter and filling a DataSet or DataTable? I'm just curious as to whether you'd have the same problem doing it that way.
~~Bonnie
>Hi,
>
>I'm trying to retrieve a datetime field from a WinCE database table using the following code:
>
>DateTime LupdDate;
>
>System.Data.SqlServerCe.SqlCeCommand sqlCeCommand2 = new
>System.Data.SqlServerCe.SqlCeCommand("select LupdDate from Product where prodid =12036",SqlCeProvider.Connection);
>
>sqlCeCommand2.Connection.Open();
>
>LupdDate = (DateTime)sqlCeCommand2.ExecuteScalar();
>
>The problem is that I only get the date part of the datetime.
>
>Any ideas why ?
>
>Best regards,
>Hans