Вниз
Скачать: CL | DM;

Процесс не может получить доступ к файлу   Найти похожие ветки 

 
Мастак ©   (2008-04-19 10:12) [0]

"выжимка" - для отлова ошибки

в xml_out.SaveToFile(file_out); (в TMSDOMDocument.save, urlmon.dll (Windows XP Prof SP2))
... raised exception class EOLEException with message "Процесс не может получить доступ к файлу,
так как этот файл занят другим процессом"
?????????

unit Unit1;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls, Buttons,
XMLDoc, XMLIntf;
type
TForm1 = class(TForm)
BitBtn1: TBitBtn;
procedure BitBtn1Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;

var
Form1: TForm1;

implementation

{$R *.dfm}

procedure TForm1.BitBtn1Click(Sender: TObject);
var
Node_zapis_out: IXMLNode;
xml_out: TXMLDocument;
file_out: string;
begin
file_out:="send.xml";
FileCreate(file_out);
FileSetAttr(file_out, faArchive);
xml_out := TXMLDocument.Create(Self);
xml_out.Active := true;
xml_out.Version := "1.0";
xml_out.Encoding := "UTF-8";
xml_out.StandAlone := "no";
xml_out.AddChild("PATIENTS");
Node_zapis_out:=xml_out.DocumentElement.AddChild("PATIENT");
Node_zapis_out.AddChild("ID").Text:=
"8a87a88115f0b0d70115f0e86c1b0004";
Node_zapis_out.AddChild("FAMILY").Text:=
"Абрамович";
xml_out.SaveToFile(file_out);
end;

end.

И каким еще другим процессом может быть занят?
Иначе попробовать с файлами?


 
Мастак ©   (2008-04-19 14:18) [1]

Вопрос снят.
процедура xml_out.SaveToFile(file_out)  создает сама указ. файл



Страницы: 1 вся ветка

Скачать: CL | DM;



Память: 0.45 MB
Время: 0.014 c
15-1207479158
Ega23
2008-04-06 14:52
2008.05.18
Агоритмы шифрации с ключом


2-1208280971
random(1024)
2008-04-15 21:36
2008.05.18
Ошибка во время выполнения потока...


15-1207358206
Tirael
2008-04-05 05:16
2008.05.18
реклама линукса


15-1207312946
@!!ex
2008-04-04 16:42
2008.05.18
MSDN для Limux API есть?


15-1207470033
{RASkov}
2008-04-06 12:20
2008.05.18
GA-965P + WD2500JS




   Наверх