| View previous topic :: View next topic |
| Author |
Message |
Ton Buurstede Guest
|
Posted: Mon Apr 26, 2004 2:50 pm Post subject: XMLData of ClientDataSet sometimes fails |
|
|
Hi,
I'm having difficulties with the XMLTransform and ClientDataSet.XMLData in
Delphi 7.
I have used XMLMapper to build a .xtr transformation file to generate Data
packets with a TXMLTransform component. The packets contain several levels
of nested datasets and are loaded in a clientdataset by a method like this:
procedure TfmMain.DoTransform;
begin
XMLTransform1.TransformationFile := 'Transformation.xtr';
XMLTransform1.SourceXmlFile := 'Source.xml';
ClientDataSet1.XMLData := XMLTransform1.Data;
end;
Once in about 500 times the assignment to XMLData fails. I get an access
violation in DBClient. Something goes wrong while opening a cursor
procedure TCustomClientDataSet.OpenCursor(InfoQuery: Boolean);
Check(FDSBase.AppendData(DataPacket, ProviderEOF));
The fail rate is a real blocker for me. Can somebody give me a suggestion?
Regards,
Ton Buurstede
|
|
| Back to top |
|
 |
Dave Rowntree Guest
|
Posted: Wed Apr 28, 2004 10:01 am Post subject: Re: XMLData of ClientDataSet sometimes fails |
|
|
Can you construct a simple app that demonstrates the problem?
--
Dave Rowntree
|
|
| Back to top |
|
 |
Ton Buurstede Guest
|
|
| Back to top |
|
 |
Dave Rowntree Guest
|
Posted: Thu Apr 29, 2004 2:58 pm Post subject: Re: XMLData of ClientDataSet sometimes fails |
|
|
How often does your test app fail for you (how many iterations)?
--
Dave Rowntree
|
|
| Back to top |
|
 |
Ton Buurstede Guest
|
Posted: Mon May 03, 2004 3:13 pm Post subject: Re: XMLData of ClientDataSet sometimes fails |
|
|
Dave,
When running a full batch of 10000 transformations I get about 40 errors.
I found a fix by Karsten Hassel changing the procedure
TClientDataSet.OpenCursor:
Inserted: nLock := DataPacket^.cLocks;
Check(FDSBase.AppendData(DataPacket, ProviderEOF));
Inserted: if DataPacket^.cLocks <> nLock
Inserted: then DataPacket^.cLocks := nLock;
The amount of errors dropped to about 4 on 10000 transformations.
Unfortunately they did not disappear completely.
There seems to be a relation between the amount of errors and the size of
source and transformation files. Smaller transformations give less errors.
I am still looking for a better workaround or fix.
Greetings,
Ton Buurstede
|
|
| Back to top |
|
 |
Dave Rowntree Guest
|
Posted: Tue May 04, 2004 11:49 am Post subject: Re: XMLData of ClientDataSet sometimes fails |
|
|
My recomendation would be to wait for D7.1 and run your tests again
then.
--
Dave Rowntree
|
|
| Back to top |
|
 |
|