Icon View Incident Report

Minor Minor
Reported By: Chris Clark
Reported On: 7/1/2014
For: Version 2.17 Build 1
# 4104 Invalid Date Values Allowed into Stored Procedure Parameters

Using the Devexpress UI Controls I have a form presented which asks for a date then passes this date into a stored procedure.

If the date control is empty the value I can see in stored procedure is 0000-00-00 (Casting this as a varchar and raising an exception to see it).

This Value can be successfully used to update a date field in a table. However this value can never be subsequently read and an exception occurs in Delphi and ElevateDB manager when trying to display the field.

After some investigation I cannot get ElevateDB (from within EDBManager) to Accept '0000-00-00' as a valid date string either in a stored procedure or query, or as a parameter when running a procedure in EDB Manager but if it is passed as a parameter in a TEDBStoredProc component from Delphi it will happily hit the ElevateDB stored procedure and can be inserted into a table.

Apparently NullDate = -700000 is a global constant for devexpress controls when a date is not set. It specifies the value for a date determined as not set.

var
  dt: TDateTime;
begin
dt := -700000
     Params[0].Value := dt;
    ExecProc;
end;



Resolution Resolution
Fixed Problem on 9/29/2014 in version 2.80 build 1


Products Affected Products Affected
ElevateDB VCL Client-Server
ElevateDB VCL Client-Server with Source
ElevateDB VCL Standard
ElevateDB VCL Standard with Source
ElevateDB VCL Trial

Image