Previous ArticleArticleThis problem is analyzed, and some manual replacement methods are solved. The following are other non-manual methods. Article connection: extreme shock -- BizTalk does not support null value update.
Problem description:
For BizTalk data exchange, message ing conversion and transmission are performed in the middle in XML format and sent to the adapter for operation.
In the schema exported by sqlserver, the node corresponding to the table field is not element, but attribute.
If a field is null, the corresponding attribute in the generated XML record does not appear.
As a result, the mapped schema message element or attribute does not appear, that is, the target cannot be updated.
For example, if a field in a record in the source table (sqlserver) is null and the field in the target table is non-null, the field cannot be updated if it is an update operation, the target table is still the original value, not null.
Solution:
1. Prevent update operations, such as deleting and inserting.
2. Replace null. For example, the character is null and the value is 0.
Method used:
The second method is used in the project. If the source table contains null values, all values are changed to null values.
Because the collection uses a stream, every change record triggers collection to a table, so the source table can have null. When the trigger inserts data into the stream table, it replaces null with null, that is ''.
Other methods:
Schema node. This attribute has the use requirement attribute. The default attribute is optional, which is optional. this attribute must exist in the XML message after it is set to required. therefore, when generating XML, the field type is ''and the numeric type is 0. varchar and INT are tested. Others are not tested.
Test shows that only the source of the ing can set this attribute. Setting only the use requirement of the target architecture cannot play its due role.
:
Others:
Oracle architecture. In the exported schema, the table field corresponds to the element and has a nillable attribute. It is estimated that the corresponding Oracle function can also be implemented. It has been too busy recently and has not been tested.
:
Summary:
The discovery of this function is occasionally found by reading the BTS reference documentation. It seems that sometimes I really don't want to go online to find too detailed problems, basically no, just find it on my own.