Board index » delphi » i/o error 32

i/o error 32

Hello All,

you guested I get the error:  i/o error 32

this happens not on all computers but sometimes.

whats is this error.

The error occures when excute the following code:

 zis_asci:=true;
            //showmessage('Controleren of _zisfoutknf.txt bestaat');
            if
fileexists(datamoduleKnf.TableDirectory.fieldByName('Zis_ascOut').asstring+'
_zisfoutknf.txt') then begin
                  //showmessage('_zisfout verwijderen');

deletefile(datamoduleKnf.TableDirectory.fieldByName('Zis_ascOut').asstring+'
_zisfoutknf.txt');
                  //showmessage('verwijdert');
            end;
            //showmessage('zis_ascii opstarten');

winexec(pchar(datamoduleKnf.TableDirectory.fieldByName('Zis_ascDir').asstrin
g+'zis_ascii '+ziszonderpunten+ ' 1
                            knf'),sw_shownormal);
            //showmessage('klaar met zis_ascii');

           {wait until the file c:\_zisfoutknf.txt exsists}
            while not
fileexists(datamoduleKnf.TableDirectory.fieldByName('Zis_ascOut').asstring+'
_zisfoutknf.txt') do ;

assignfile(fileterug,datamoduleKnf.TableDirectory.fieldByName('Zis_ascOut').
asstring+'_zisfoutknf.txt');
            reset(fileterug);
            readln(fileterug,result);
            closefile(fileterug);

when i put the showmessages in the error didn't occured.

How to deal with this.

--
Regards,
Marco
(University Hospital Maastricht)

 

Re:i/o error 32


<<Marco Schlicher:
you guested I get the error:  i/o error 32

Quote

That means a sharing violation - you're trying to
access a file that is already in use.

--
Deborah Pate

Other Threads