diff --git a/Distribution/wwDotnetBridge.PRG b/Distribution/wwDotnetBridge.PRG index 92e1af2..3165105 100644 --- a/Distribution/wwDotnetBridge.PRG +++ b/Distribution/wwDotnetBridge.PRG @@ -1225,7 +1225,7 @@ ENDFUNC *** the data *** Return: DataSet or NULL ************************************************************************ -FUNCTION CursorToDataSet(lcAliasList) +FUNCTION CursorToDataSet(lcAliasList,fixemptydates) LOCAL lnX, lcXml IF EMPTY(lcAliasList) @@ -1253,6 +1253,20 @@ IF EMPTY(lcXml) RETURN null ENDIF +IF fixemptydates +* add nillable=true to xds part of xml for date and Datetime fileds +lcXml= STRTRAN(lcXml,'type="xsd:date"' ,'type="xsd:date" nillable="true"') && dates +lcXml= STRTRAN(lcXml,'type="xsd:dateTime"' ,'type="xsd:dateTime" nillable="true"') &&dateTime +*delete all self closeing tags for date fileds from the xml +FOR lnX = 1 TO lnCount && loop lcAliasList +FOR Lnxfldloop = 1 TO AFIELDS(afldsarr,laCursors[lnX]) && loop Fields +IF INLIST(afldsarr(Lnxfldloop ,2),"D","T") +lcXml= STRTRAN(lcXml, '<'+LOWER(afldsarr(Lnxfldloop ,1) )+'/>' ,'') +endif +endfor +ENDFOR +ENDIF + RETURN THIS.XmlStringToDataSet(lcXml) ENDFUNC * CursorToDataSet @@ -2165,4 +2179,4 @@ ENDFUNC ************************************************************************ FUNCTION InitializeDotnetCoreVersion(lcVersion) RETURN GetwwDotnetCoreBridge(lcVersion) -ENDFUNC \ No newline at end of file +ENDFUNC