BorlandTalk.com Forum Index BorlandTalk.com
Borland discussion newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

XMLData of ClientDataSet sometimes fails

 
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi Databases (Multi-Tier)
View previous topic :: View next topic  
Author Message
Ton Buurstede
Guest





PostPosted: Mon Apr 26, 2004 2:50 pm    Post subject: XMLData of ClientDataSet sometimes fails Reply with quote



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





PostPosted: Wed Apr 28, 2004 10:01 am    Post subject: Re: XMLData of ClientDataSet sometimes fails Reply with quote



Can you construct a simple app that demonstrates the problem?
--
Dave Rowntree
Back to top
Ton Buurstede
Guest





PostPosted: Thu Apr 29, 2004 2:09 pm    Post subject: Re: XMLData of ClientDataSet sometimes fails Reply with quote



example is available at http://mail.tjip.com/download/demo.zip

Regards,

Ton Buurstede


Back to top
Dave Rowntree
Guest





PostPosted: Thu Apr 29, 2004 2:58 pm    Post subject: Re: XMLData of ClientDataSet sometimes fails Reply with quote

How often does your test app fail for you (how many iterations)?
--
Dave Rowntree
Back to top
Ton Buurstede
Guest





PostPosted: Mon May 03, 2004 3:13 pm    Post subject: Re: XMLData of ClientDataSet sometimes fails Reply with quote

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





PostPosted: Tue May 04, 2004 11:49 am    Post subject: Re: XMLData of ClientDataSet sometimes fails Reply with quote

My recomendation would be to wait for D7.1 and run your tests again
then.
--
Dave Rowntree
Back to top
Display posts from previous:   
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi Databases (Multi-Tier) All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.