virtualtable loadfromfile with xml error;
virtualtable loadfromfile with xml error;
I use virtualtable savetoxml function save a file,
and use loadfromfile function to load this file.
it can't load fileds value correct.
and use loadfromfile function to load this file.
it can't load fileds value correct.
Re: virtualtable loadfromfile with xml error;
my delphi is xe4,
virtualtable is 9.02.
os is win7 , simplechinese.
virtualtable is 9.02.
os is win7 , simplechinese.
Re: virtualtable loadfromfile with xml error;
Hello,
If you are using Unicode symbols, you should create WideString and WideMemo instead of String and Memo for correct work. In this case, data will be stored and loaded correctly
If you are using Unicode symbols, you should create WideString and WideMemo instead of String and Memo for correct work. In this case, data will be stored and loaded correctly
Re: virtualtable loadfromfile with xml error;
Thank for your reply,
I have used follow code:
vt.Close;
cx.Open;
vt.Assign(cx); // cx is a adoquery
vt.open;
vt.SaveToXML('d:\mytest2.xml');
it saved a xml file;
and use follow code to load the xml file:
vt.Close;
vt.LoadFromFile('d:\mytest2.xml');
it shows error.
I don't know where to use ' create WideString and WideMemo instead of String and Memo'?
I have used follow code:
vt.Close;
cx.Open;
vt.Assign(cx); // cx is a adoquery
vt.open;
vt.SaveToXML('d:\mytest2.xml');
it saved a xml file;
and use follow code to load the xml file:
vt.Close;
vt.LoadFromFile('d:\mytest2.xml');
it shows error.
I don't know where to use ' create WideString and WideMemo instead of String and Memo'?
Re: virtualtable loadfromfile with xml error;
Hello,
Please provide the script of the table used in ADO, as well as the text of the error message you get when loading from the file to VT
Please provide the script of the table used in ADO, as well as the text of the error message you get when loading from the file to VT
Re: virtualtable loadfromfile with xml error;
CREATE TABLE dev.dbo.aa (
dev_type nvarchar(50) NULL,
dev_name nvarchar(50) NULL
)
cx.sql='select * from aa'
error message:'parser:the unknown symbol'
the saved xml file is:
<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 id='RowsetSchema'>
<s:ElementType name='row' content='eltOnly' rs:updatable='true'>
<s:AttributeType name='dev_type' rs:number='1' rs:nullable='true' rs:writeunknown='true'>
<s:datatype dt:type='string' dt:maxLength='50' />
</s:AttributeType>
<s:AttributeType name='dev_name' rs:number='2' rs:nullable='true' rs:writeunknown='true'>
<s:datatype dt:type='string' dt:maxLength='50' />
</s:AttributeType>
<s:extends type='rs:rowbase' />
</s:ElementType>
</s:Schema>
<rs:data>
<z:row dev_type='张宝蓝,上明关心' dev_name='张宝蓝' />
<z:row dev_type='张宝蓝,上明关心' dev_name='张宝蓝' />
<z:row dev_type='张宝蓝,上明关心' dev_name='张宝蓝' />
<z:row dev_type='张宝蓝,上明关心' dev_name='张宝蓝' />
<z:row dev_type='张宝蓝,上明关心' dev_name='张宝蓝' />
<z:row dev_type='张宝蓝,上明关心' dev_name='张宝蓝' />
<z:row dev_type='张宝蓝,上明关心' dev_name='张宝蓝' />
</rs:data>
</xml>
dev_type nvarchar(50) NULL,
dev_name nvarchar(50) NULL
)
cx.sql='select * from aa'
error message:'parser:the unknown symbol'
the saved xml file is:
<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 id='RowsetSchema'>
<s:ElementType name='row' content='eltOnly' rs:updatable='true'>
<s:AttributeType name='dev_type' rs:number='1' rs:nullable='true' rs:writeunknown='true'>
<s:datatype dt:type='string' dt:maxLength='50' />
</s:AttributeType>
<s:AttributeType name='dev_name' rs:number='2' rs:nullable='true' rs:writeunknown='true'>
<s:datatype dt:type='string' dt:maxLength='50' />
</s:AttributeType>
<s:extends type='rs:rowbase' />
</s:ElementType>
</s:Schema>
<rs:data>
<z:row dev_type='张宝蓝,上明关心' dev_name='张宝蓝' />
<z:row dev_type='张宝蓝,上明关心' dev_name='张宝蓝' />
<z:row dev_type='张宝蓝,上明关心' dev_name='张宝蓝' />
<z:row dev_type='张宝蓝,上明关心' dev_name='张宝蓝' />
<z:row dev_type='张宝蓝,上明关心' dev_name='张宝蓝' />
<z:row dev_type='张宝蓝,上明关心' dev_name='张宝蓝' />
<z:row dev_type='张宝蓝,上明关心' dev_name='张宝蓝' />
</rs:data>
</xml>
Re: virtualtable loadfromfile with xml error;
hello,
Please send the generated XML file to alexp*devart*com
Please send the generated XML file to alexp*devart*com
Re: virtualtable loadfromfile with xml error;
ok,I send it to you.
Re: virtualtable loadfromfile with xml error;
Hello,
The XML you have sent is loaded with no errors. Please send your table dump.
The XML you have sent is loaded with no errors. Please send your table dump.
Re: virtualtable loadfromfile with xml error;
I can't load this xml file.
and what's "table dump"?
and what's "table dump"?
Re: virtualtable loadfromfile with xml error;
Hello,
Create database backup ( http://technet.microsoft.com/en-us/libr ... 87510.aspx ), if your DB is large volume, move this table to a separate DB and create its backup, also please specify the exact version of SQL Server server and client. You can learn it from the Info sheet of TMSConnection Editor.
Create database backup ( http://technet.microsoft.com/en-us/libr ... 87510.aspx ), if your DB is large volume, move this table to a separate DB and create its backup, also please specify the exact version of SQL Server server and client. You can learn it from the Info sheet of TMSConnection Editor.
Re: virtualtable loadfromfile with xml error;
I don't think it's a MS's bug.
I traced the code.
in crxml.pas
in line 205.
Str := Encoding.Default.GetString(FTmpBlock, 0, FLastBlockSize);
I changed it to:
Str := Encoding.UTF8.GetString(FTmpBlock, 0, FLastBlockSize);
and in line 516:
GetXMLNodeAttributes(CRFunctions.UTF8Decode(AnsiString(Value)), FAttrNames, FAttrValues);
I changed it to:
GetXMLNodeAttributes(Value, FAttrNames, FAttrValues);
It works fine for me when record number<458.
but when record number>458. it show 'parser:the unknown symbol' again.
I traced the code.
in crxml.pas
in line 205.
Str := Encoding.Default.GetString(FTmpBlock, 0, FLastBlockSize);
I changed it to:
Str := Encoding.UTF8.GetString(FTmpBlock, 0, FLastBlockSize);
and in line 516:
GetXMLNodeAttributes(CRFunctions.UTF8Decode(AnsiString(Value)), FAttrNames, FAttrValues);
I changed it to:
GetXMLNodeAttributes(Value, FAttrNames, FAttrValues);
It works fine for me when record number<458.
but when record number>458. it show 'parser:the unknown symbol' again.
Re: virtualtable loadfromfile with xml error;
Hello,
Please provide the exact regional settings of the Windows on which this problem occurs
Please provide the exact regional settings of the Windows on which this problem occurs
Re: virtualtable loadfromfile with xml error;
my regional settings is china (codepage 936)
Re: virtualtable loadfromfile with xml error;
Hello,
Thank you for the information. We have reproduced the problem and will fix it as soon as possible.
Thank you for the information. We have reproduced the problem and will fix it as soon as possible.