Вниз
Скачать: 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.012 c
2-1208345263
Fasco
2008-04-16 15:27
2008.05.18
помогите ...............


15-1207233109
Gabriel'
2008-04-03 18:31
2008.05.18
С чего нужно начать писать компьютерные игры?


15-1207018692
X9
2008-04-01 06:58
2008.05.18
Розыгрыши на 1 апреля


2-1208929981
Джек874585
2008-04-23 09:53
2008.05.18
Юникод в Delphi


15-1207576451
Kolan
2008-04-07 17:54
2008.05.18
Как упорядочить программы в пуске по алфавиту?




   Наверх