| jayMeer 2006-01-27, 8:24 pm |
| I'm trying to insert a single space as the value into a non-nullable
column. The column definition in the SQL database / table is
ship_to_code (varchar(8), Not Null)
The xsd (in file atf.xsd) describes the element as
<xsd:element name="ship_to_code" type="xsd:string" />
My map fixes the value of the ship_to_code element as
<ship_to_code>
<xsl:text> </xsl:text>
</ship_to_code>
The output (in file out.xml) from the transformation looks like
<ship_to_code> </ship_to_code>
But when I execute
xmlBulkLoader.Execute("ATF.xsd", "out.xml")
the bulkloader raises the error
***ERROR: No data was provided for column 'ship_to_code' on table
'arinpchg', and this column cannot contain NULL values.
If out.xml shows a single space as the value of the ship_to_code
element, why is it presenting to the bulk loader as a null?
I tried eliminating the ship_to_code element from out.xml and changed
the xsd to
<xsd:element name="ship_to_code" type="xsd:string" minOccurs="0"
default="zzz"/>
hoping to get 'zzz' into the record, but the bulkloader raises the same
error.
What am I doing wrong?
Thanks - J
|