Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Exception in midas.dll

82 views
Skip to first unread message

Patrick Charles

unread,
Jan 18, 2002, 9:26:36 AM1/18/02
to
Hi,

I sometimes get an exception in midas.dll when I load XML data into a
TClientDataset using ACds.LoadFromStream().

The code looks like:

var
XMLText: string;
begin
// Load XMLText
...
if ACds.Active then ACds.Close;
stream := TStringStream.Create( XMLText );
try
try
stream.Position := 0;
ACds.LoadFromStream( stream );
except
raise;
end;
finally
stream.Free;
end;

ACds.LoadFromStream( stream ) is the line causing the problem. It happens
only when XMLText describes a dataset with nested datasets, like a person
with phone numbers, addresses, etc...

I have read lots of things in the newsgroups about this, but no good answer
yet.

Anybody knows a way around?

I use Delphi 5, I even tried to use Delphi 6 midas.dll.

Thank you.

Patrick.

Carlos H Cantu

unread,
Jan 18, 2002, 12:38:29 PM1/18/02
to
Read the following messages in this newsgroup :

Subject: Cannot use Delphi 6 MIDAS.DLL in Windows 2000 !
Subject: Re: Access Violation in LoadFromFile (XML)

As you said... no solution yet.

- Carlos

"Patrick Charles" <pcha...@deltaware.com> escreveu na mensagem
news:3c48300e$1_2@dnews...

zlatko

unread,
Jan 20, 2002, 9:40:13 AM1/20/02
to
Guys,
Try to apply patch from
http://radweb.borland.com/codecentral/ccweb.exe/listing?id=16917
You'll be supprised.
In my case memory leak still exists, but is lower.
I couldn't provoke exception in 300 000 iterations.
This is significant improvement.

"Carlos H Cantu" <cantu_...@cnptia.embrapa.br> wrote in message
news:3c484ea7_1@dnews...

Carlos H. Cantu

unread,
Jan 21, 2002, 8:16:11 AM1/21/02
to
We have that patch applied since the begining of the project, but it doesnt
solve our problem. The AV keeps happening :-(

- Carlos

"zlatko" <Zla...@zms.pan> wrote in news:3c4ad6f4_1@dnews:

Patrick Charles

unread,
Jan 22, 2002, 3:39:32 PM1/22/02
to
Anybody knows (has code on) how to dump XML data in a ClientDataSet without
using LoadFromFile nor LoadFromStream.

I am thinking about a function that would scroll through the XML file and
create fields at run time...

This could be a way around the problem.

Patrick

"Carlos H. Cantu" <warmboot...@hotmail.com> wrote in message
news:Xns919D71AA81...@207.105.83.65...

Dan Miser (Borland)

unread,
Jan 23, 2002, 10:58:27 PM1/23/02
to
You could use that approach, but it seems much more cumbersome than just
ensuring that a BLOB field has a single space in it before saving to file.
The issue is under investigation for a complete fix where you won't need to
worry about any workaround.
--
Dan Miser
http://www.distribucon.com
http://www.borland.com

"Patrick Charles" <pcha...@deltaware.com> wrote in message
news:3c4dcd72$1_1@dnews...

Patrick Charles

unread,
Jan 25, 2002, 1:19:52 PM1/25/02
to
Dan,

Thank you for your answer.
my problem is when I load datasets containing nested datasets.
Anyway, I hope that the complete fix will fix this also.

Do you know if the fix will be for Delphi 5 or/and Delphi 6, or Delphi 6
only?
Right now I am using Delphi 5.

Thanks again.

Patrick Charles
535 North River Road
Charlottetown PE C1E 1J6
Canada
(mailto:pcha...@deltaware.com)
Phone: (902) 628-4582
Fax: (902) 628-4660


"Dan Miser (Borland)" <dmi...@borland.com> wrote in message
news:3c4f8694$1_2@dnews...

Martin

unread,
Jan 29, 2002, 5:09:02 AM1/29/02
to
[This followup was posted to borland.public.datasnap and a copy was sent
to the cited author.]

In article <3c48300e$1_2@dnews>, pcha...@deltaware.com says...


>
> I sometimes get an exception in midas.dll when I load XML data into a
> TClientDataset using ACds.LoadFromStream().

One thing you might try is calling MergeChangeLog before saving the
dataset to the stream in the first place (iow, put ACDS.MergeChangeLog on
the line before ACDS.SaveToStream()).
Worked wonders for us, but we're using the MIDASLib.DCU, and not the
MIDAS.DLL, so there might be some differences. And we're on D6. YMMV.

M.

Dan Miser (Borland)

unread,
Jan 31, 2002, 12:20:43 PM1/31/02
to
There was a bug in the D5 version of MIDAS.DLL that would exhibit the same
behavior, with the same work-around. I woulod be interested in seeing
whether or not you have the same error if you use MIDAS.DLL instead.

"Martin" <LLOQPT...@spammotel.com> wrote in message
news:MPG.16c093269...@forums.borland.com...

0 new messages