G
Guest
Hi I have a Visual Studio .NET Generated DataSet from SQL servers using the
wizard.
I have a particular table with the column that stores when the row in the
table was last updated.
I then have the following code...
foreach (DataRow object in DataSet.DataTable)
{
object.LastUpdated = DateTime.Now;
}
try {
ObjectDataAdapter.Update(DataSet.DataTable)
}
catch (System.InvalidCastException ex)
{
.... read data. key/value pairs for debug
}
for some reason when I try to update the SQL 05 database I get the following
error:
"Invalid cast from 'Int32' to 'DateTime'."
this is a InvalidCastException but the key/value pairs within the Data
property of the exception are empty and the TargetSite says
{Void UpdatedRowStatusErrors(System.Data.Common.RowUpdatedEventArgs,
BatchCommandInfo[], Int32)}
Both regional settings and timezones are both the same on the server and the
client that has VS.NET on it.
Can anyone help?
wizard.
I have a particular table with the column that stores when the row in the
table was last updated.
I then have the following code...
foreach (DataRow object in DataSet.DataTable)
{
object.LastUpdated = DateTime.Now;
}
try {
ObjectDataAdapter.Update(DataSet.DataTable)
}
catch (System.InvalidCastException ex)
{
.... read data. key/value pairs for debug
}
for some reason when I try to update the SQL 05 database I get the following
error:
"Invalid cast from 'Int32' to 'DateTime'."
this is a InvalidCastException but the key/value pairs within the Data
property of the exception are empty and the TargetSite says
{Void UpdatedRowStatusErrors(System.Data.Common.RowUpdatedEventArgs,
BatchCommandInfo[], Int32)}
Both regional settings and timezones are both the same on the server and the
client that has VS.NET on it.
Can anyone help?