ReadXml列名与表名相同. [英] ReadXml Column name is same as table name.

查看:69
本文介绍了ReadXml列名与表名相同.的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我遇到错误.
列"ListPrice"不属于表ListPrice."

我有一个xml文件,我正在将其读取到数据表中. Xml的表名称为"ListPrice",而xml的列也名为"ListPrice".
那就是为什么得到这个错误.请帮忙.

Xml是:

I am getting an error.
"Column ''ListPrice'' does not belong to table ListPrice."

I have an xml file and i am reading it to a datatable. Xml has table name "ListPrice" and xml has a column also having name "ListPrice".
Thats why getting this error. Some help plz.

Xml is:

- <SendListPriceToHub ">
- <XMLData>
- <ListPrice>
  <CompanyID>abcd</CompanyID>
  <SalesOrg>yy</SalesOrg>
  <ProductID>55</ProductID>
  <ValidFrom>2011-07-01T00:00:00+10:00</ValidFrom>
  <ValidTo>9999-12-31T00:00:00+10:00</ValidTo>
  <UOM>aa</UOM>
  <ListPrice>456.25</ListPrice>
  <RecordType>a</RecordType>
  <LineID>555</LineID>
  <UpdatedDate>2011-07-22T17:41:53+00:00</UpdatedDate>
  </ListPrice>
  </XMLData>
  </SendListPriceToHub>




在此先谢谢您.




Thanks in advance.

推荐答案

我并没有真正解决您的问题,但是从错误消息中可能会出现命名冲突.

建议
I don''t really get your problem but from the error message, there may be a naming conflict.

Suggestions

  1. 您可以尝试重命名
  2. 仔细检查要尝试访问的ListPrice的类型(可能是您误认为XML中的ListPrice节点位于ListPrice列中表.
  3. 设置一个断点以查看该点出了什么问题.



注意:以上是建议,因为您的问题对我来说并不明确



Note: The above are suggestions as your question is not clear to me


这篇关于ReadXml列名与表名相同.的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆