I have been searching on this for hours and can not figure out the issue. Could someone please help me with this? I am getting the above error when Executing a SQLXMLBULKLOAD in VB.NET 2010. I have attempted changing my xml declaration, my schema attributes, on and on and can not get past this error. It seems to be trivial but I can not figure it out. Please help
我已经在这上面搜索了好几个小时,还是弄不清楚。有人能帮我一下吗?在VB中执行SQLXMLBULKLOAD时,我得到了上面的错误。2010年净。我尝试过修改xml声明、模式属性等等,但还是无法通过这个错误。这事似乎微不足道,但我却搞不懂。请帮助
<?xml version="1.0" ?>
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:sql="urn:schemas-microsoft-com:mapping-schema">
<xsd:element name="Employees" sql:is-constant="1">
<xsd:complexType>
<xsd:sequence maxOccurs="unbounded">
<xsd:element name="Employee" sql:relation="the_Employees">
<xsd:complexType>
<xsd:sequence maxOccurs="unbounded">
<!--<xsd:element name="id" type="xsd:integer" />-->
<xsd:element name="EmployeeID"sql:field="EmpNo">
<xsd:simpleType>
<xsd:restriction base="xsd:string">
<xsd:whiteSpace value="collapse"/>
</xsd:restriction>
</xsd:simpleType>
</xsd:element>
<xsd:element name="FirstName"sql:field="FirstName">
<xsd:simpleType>
<xsd:restriction base="xsd:string">
<xsd:whiteSpace value="collapse"/>
</xsd:restriction>
</xsd:simpleType>
</xsd:element>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
</xsd:schema>
2 个解决方案
#1
6
You need a space between attributes.
属性之间需要一个空格。
Like this one in line 10.
就像第10行中的这个。
<xsd:element name="EmployeeID"sql:field="EmpNo">
should be
应该是
<xsd:element name="EmployeeID" sql:field="EmpNo">
#2
1
And on this one in line 16 you need a space. otherwise, you are good to go:
第16行需要一个空格。否则,你可以走了:
<xsd:element name="FirstName"sql:field="FirstName">
< xsd:元素名称=“FirstName”sql:字段=“FirstName”>
change to:
改变:
<xsd:element name="FirstName" sql:field="FirstName">
< xsd:元素名称=“FirstName”sql:字段=“FirstName”>
#1
6
You need a space between attributes.
属性之间需要一个空格。
Like this one in line 10.
就像第10行中的这个。
<xsd:element name="EmployeeID"sql:field="EmpNo">
should be
应该是
<xsd:element name="EmployeeID" sql:field="EmpNo">
#2
1
And on this one in line 16 you need a space. otherwise, you are good to go:
第16行需要一个空格。否则,你可以走了:
<xsd:element name="FirstName"sql:field="FirstName">
< xsd:元素名称=“FirstName”sql:字段=“FirstName”>
change to:
改变:
<xsd:element name="FirstName" sql:field="FirstName">
< xsd:元素名称=“FirstName”sql:字段=“FirstName”>