Skip to main content


 

Symptoms


Unable to pass NULL value when executing UPDATE method against DateTime format column of SQL Server SMO neither from SMO Service Tester nor from the SMO Event in the workflow.

When attempting to update SQL record via smartobject from workflow for the fields of the type Memo, Number etc. it is sufficient to pass SCNULL (like in Services Tester), but this doesn't work for DateTime fields.

Reproduction Steps:
1) Create SQL table with column of DateTime type.
2) Generate smartobject for this table using SmartObjects Services Tester tool.
3) Manually create some record in the SQL table you created via SQL Management Studio and set some value for DateTime column, other than NULL.
3) Call smartobject event in workflow. In Input parameters for the smartobject try to assign NULL value to the DateTime field in the database.

 

Diagnoses


This is known issue which exist both in 4.6.7 and 4.6.8 versions.
 

Resolution

There is an existing feature request for this functionality which is slated to be implemented in the post 4.6.9 release.




 

I've just tested this in 4.7 May 2017 CU FP2 - setting DateTime to NULL using SCNULL from workflow still does not work with the following error: 


 


The string was not recognized as a valid DateTime. There is an unknown word starting at index 0.


 


I guess the only workaround to this is set to some default date time value in the very beginning of allowed datatype range.


Reply