• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

Delphi ADO RecordSet BUG?

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

Delphi6,7提供ADO RecordSet的LoadFromFile和SaveToFile方法
与Xml交互:

procedure LoadFromFile(const FileName: WideString);

Description

Call LoadFromFile to load the recordset for the calling ADO dataset component from a file. If the loading operation fails, the current recordset is neutralized (set to nil), the dataset component remains inactive, and an EOleException exception is raised. If the attempt to load data from a file is successful, the ADO dataset component is automatically activated and the data made available.

FileName is a string containing the name of the file.

LoadFromFile closes the dataset component before loading the recordset from the file specified in FileName.

其xml文档编码格式要求为utf8:

<xml xmlns:s="uuid:BDC6E3F0-6DA3-11d1-A2A3-00AA00C14882" xmlns:dt="uuid:C2F41010-65B3-11d1-A29F-00AA00C14882" xmlns:rs="urn:schemas-microsoft-com:rowset" xmlns:z="#RowsetSchema">
    <s:Schema />
            </s:AttributeType>

在D6中RecordSet.LoadFromFile后,RS中数据是存在的,但rs.FieldByName('C07').ToString Throw a Error

手工改变xml文件,将dt:maxleng配置为10,没有错误,但该字段被截取成10位长度了

看来只需在.Net端生成xml时将dt:maxleng配置得足够大
然而很不幸,dt:maxleng>8200+时(具体为多少没测试,当时急着改BUG)
出现问题和dt:maxleng=-1一样

看来只有使用小于8000的文本了



鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
为什么安装了MinGW之后,还是不能在Matlab中使用mex?发布时间:2022-07-18
下一篇:
Latex中Matlab代码的环境发布时间:2022-07-18
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap