?
Solved

Safe Arrays question

Posted on 2004-09-21
3
Medium Priority
?
511 Views
Last Modified: 2008-05-29
I am taking xml data from a web service (data is good) and loading it into a dataset.

Here is the code that does that:
 procedure TForm1.GetDataFromWebService(AStrXMLDoc: string);
begin
  XMLTransform1.TransformationFile := 'sites.xtr';
  XMLTransform1.SourceXml := AStrXMLDoc;

  ClientDataSet1.XMLData := XMLTransform1.Data;
end;



For some reason that code is throwing esafearraylockederror-variant or safe array is locked.   I cant find anything about this sucker.   any ideas folks?

Andrew
0
Comment
Question by:hibbidiji
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 

Expert Comment

by:linus66
ID: 12167254
Try->  var before the parameter
Your sending a pointer and if the origin string destroys, the pointer lose its values
procedure TForm1.GetDataFromWebService(var AStrXMLDoc: string);
begin
  XMLTransform1.TransformationFile := 'sites.xtr';
  XMLTransform1.SourceXml := AStrXMLDoc;

  ClientDataSet1.XMLData := XMLTransform1.Data;
end;

Good luck
// Linus
0
 
LVL 1

Accepted Solution

by:
jcoman777 earned 2000 total points
ID: 12173398
It is caused by a corrupt midas.dll.   I also found answers in google groups that showed this fixed this error for other people as well.  
First: startmenu->run->regsvr32 /u "c:\windows\system32\midas.dll"
 
Then: Update your midas.dll in c:\windows\system32 (for XP, other windows versions vary) and startmenu->run->regsvr32 "c:\windows\system32\midas.dll"
0
 
LVL 1

Author Comment

by:hibbidiji
ID: 12173668
thank god! that totally did it!
0

Featured Post

New feature and membership benefit!

New feature! Upgrade and increase expert visibility of your issues with Priority Questions.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Have you ever had your Delphi form/application just hanging while waiting for data to load? This is the article to read if you want to learn some things about adding threads for data loading in the background. First, I'll setup a general applica…
In my programming career I have only very rarely run into situations where operator overloading would be of any use in my work.  Normally those situations involved math with either overly large numbers (hundreds of thousands of digits or accuracy re…
Michael from AdRem Software explains how to view the most utilized and worst performing nodes in your network, by accessing the Top Charts view in NetCrunch network monitor (https://www.adremsoft.com/). Top Charts is a view in which you can set seve…
How to fix incompatible JVM issue while installing Eclipse While installing Eclipse in windows, got one error like above and unable to proceed with the installation. This video describes how to successfully install Eclipse. How to solve incompa…
Suggested Courses

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question