Solved

Safe Arrays question

Posted on 2004-09-21
3
482 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
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 500 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

Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

Join & Write a Comment

Objective: - This article will help user in how to convert their numeric value become words. How to use 1. You can copy this code in your Unit as function 2. than you can perform your function by type this code The Code   (CODE) The Im…
Introduction I have seen many questions in this Delphi topic area where queries in threads are needed or suggested. I know bumped into a similar need. This article will address some of the concepts when dealing with a multithreaded delphi database…
It is a freely distributed piece of software for such tasks as photo retouching, image composition and image authoring. It works on many operating systems, in many languages.
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, Just open a new email message.  In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…

744 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

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now