Вниз
Скачать: 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
9-1170243667
Ricks
2007-01-31 14:41
2008.05.18
Проблемма с 3D графикой


2-1208844141
dumka
2008-04-22 10:02
2008.05.18
запросы


2-1208858129
AlexAA
2008-04-22 13:55
2008.05.18
Открыть файл .exe


2-1208365866
Dmitry
2008-04-16 21:11
2008.05.18
Ошибка при присваивании значения переменной класса


2-1208425578
VictoR407
2008-04-17 13:46
2008.05.18
Как удалить полосы прокрутки в компоненте treeview?




   Наверх