Home All Groups Group Topic Archive Search About

Data Type mismatch in criteria expression!

Author
22 Feb 2006 5:50 AM
idiot
Source code:
    DataRow rzsfRow = dataTableRZFS().NewRow();
    ...
    rzsfRow["HZRZYF"] = DateTime.ParseExact("200602", "yyyyMM", null);
    ...
    string sql = "UPDATE RZSF SET HZ_RZYF=@HZ_RZYF ... WHERE ...";
    ...
    OleDbParameter param = this.command.CreateParameter();
    param.OleDbType = OleDbType.Date;
    ...
    ExecuteNonQuery();

    The update sql throw OleDbException : Data Type mismatch in criteria
expression on some machine.
    Column "HZRZYF" has not time value. Need I change the OleDbType property
to OleDbType.DBDate?

AddThis Social Bookmark Button