Solved

Safe Arrays question

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

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

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

This article explains how to create forms/units independent of other forms/units object names in a delphi project. Have you ever created a form for user input in a Delphi project and then had the need to have that same form in a other Delphi proj…
Introduction The parallel port is a very commonly known port, it was widely used to connect a printer to the PC, if you look at the back of your computer, for those who don't have newer computers, there will be a port with 25 pins and a small print…
Are you ready to implement Active Directory best practices without reading 300+ pages? You're in luck. In this webinar hosted by Skyport Systems, you gain insight into Microsoft's latest comprehensive guide, with tips on the best and easiest way…

730 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