Note that there are some explanatory texts on larger screens.

plurals
  1. POBizTalk WCF Oracle Adapter: Sending DateTime values
    primarykey
    data
    text
    <p>I'm trying to use the WCF Oracle adapter to insert data in an Oracle table. The table has a DateTime field. I set the field's value in an orchestration, using a distinguished field, then send the message to a send port configured to use the WCF Oracle adapter.</p> <p>This gives me the following error when the message is sent to Oracle:</p> <blockquote> <p>Value for the field is invalid. DateTime.Kind must be DateTimeKind.Unspecified. Ensure that there is no TimeZone or TimeZoneOffset contained in the DateTime value.</p> </blockquote> <p>I tried to use this to force the DateTimeKind to be unspecified:</p> <pre><code>msg.ProcessedDateTime = System.DateTime.SpecifyKind( System.DateTime.Now.ToLocalTime(), System.DateTimeKind.Unspecified); </code></pre> <p>but I still get the same error message.</p> <p>I can also see that the XML generated for this message uses the following format for dates: yyyy-MM-ddTHH:mm:ss.ffffffZ</p> <p>The problem seems to be with the Z at the end of the string, which specifies a time zone (GMT+0)</p> <p>I can't simply assign to the "ProcessedDateTime" property an arbitrary string (with a format I could control), because the schema defines the field as a xs:dateTime, so an orchestration requires that I use a System.DateTime value.</p> <p>How can I force the System.DateTime representation to <em>not</em> contain any time zone information? Note that I can't control the representation directly, since the DateTime is converted to a string by BizTalk, not by my code.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload