Icon View Thread

The following is the text of the current message along with any replies.
Messages 1 to 2 of 2 total
Thread default value
Thu, Jul 3 2014 5:40 AMPermanent Link

Paul Waegemans

IMS bvba

Avatar

I have a DBISAM table (4.37 build3) who has a date field with New Record/Default value = current_time

Adding a record is Dbsys works properly and the field has the currentdate.

Adding a record in application build with EWB (1.03 build 7) the field does not reveive any value.

Paul Waegemans
Thu, Jul 3 2014 8:45 AMPermanent Link

Walter Matte

Tactical Business Corporation

Paul:

I'm going to take a guess here...

When you Insert into a Dataset from EWB - EWB doesn't really Insert the record to the physical file.  EWB is a front end, so if you have an EWB Dataset that, in the backend table has defaults, when you insert in EWB it doesn't know about the backend - it could be any database (MS SQL, Oracle.. etc)  it sends back the JSON as described in the EWB Manual.

You could use Fiddler and see what is being Posted back to your server.  My guess is that the date field is Null.  So when it gets back to the Server to Insert it physically, it does the DEFAULT but then gets overwritten by the NULL sent back from the EWB front end.

I would suggest you set the date your self in the EWB Dataset using the OnInitRow event.

Walter
Image