Board index » off-topic » I/O Error 103

I/O Error 103


2005-02-14 11:34:42 PM
off-topic17
Anyone ever get "I/O Error 103" when running a program that uses Paradox
tables through the BDE? We have a division that has about 50 sites that
uses Paradox tables, etc., with a Delphi front end. Four of these sites
consistently get this error when we're running the update program that tries
to update the Paradox files that we just downloaded from a script. The
other 46 do not. Could it be a problem with the connection (64 bps on Frame
Relay) not finishing copying the file when it tries to post? It's not the
program, I don't believe, because at the end of the day, each of these
machines pulls the data from another machine and it posts fine, without
error.
Thanks!
Steve
 
 

Re:I/O Error 103

Quote
Anyone ever get "I/O Error 103" when running a program that uses Paradox
tables through the BDE?
Do you use old I/O routines (BlockRead, BlockWrite, etc...)? If so, I/O
error 103 is "File not open" and is reported by CloseFile, Read, Write,
Seek, Eof, FilePos, FileSize, Flush, BlockRead or BlockWrite if the file
is not properly open.
Good luck,
Ronaldo
 

Re:I/O Error 103

Are you getting an error when you open the file?
Do you have file I/O exceptions enabled with {$I+}?
Do you know what statement causes the error?
This may be a timing error if your code creates the file and tries to
open it immediately thereafter. You might try adding a time delay
between creating and opening the file.
--
Bill Todd (TeamB)
 

{smallsort}

Re:I/O Error 103

I have a database app shared by about 10 people.
I create a report in a text file, copying fields into strings and writeln
the strings, and open the text file in Word. Each text file has a different
filename. Yet if one user has one file open in Word, and another tries to
open another, they get an I/O Error 103.
Is there a way to correct this?
Thanks
 

Re:I/O Error 103

"John Luetich" < XXXX@XXXXX.COM >wrote
Quote
I have a database app shared by about 10 people.
I create a report in a text file, copying fields into
strings and writeln the strings, and open the text
file in Word.
Each text file has a different filename.
I can believe that. <g>
Quote
Yet if one user has one file open in Word, and another tries to open
another,
Another? Has the writer close the file?
Quote
they get an I/O Error 103.
To find more info on the subject error:
groups.google.com/groups&as_oq=&as_ugroup=borland.public.delphi.*
HTH, JohnH
PS: Maybe it is time to learn about classic databases.
 

Re:I/O Error 103

I didn't appreciate the PS
More explicitly, I have a table with a number that gets incremented every
time a text file report is generated (the number goes into the filename), so
the names are unique, and yet sometimes, not always, I/O 103 appears.
Any ideas, from a classic point of view?
"John Herbster" <herb-sci1_at_sbcglobal.net>wrote in message
Quote

"John Luetich" < XXXX@XXXXX.COM >wrote
>I have a database app shared by about 10 people.
>I create a report in a text file, copying fields into
>strings and writeln the strings, and open the text
>file in Word.

>Each text file has a different filename.

I can believe that. <g>

>Yet if one user has one file open in Word, and another tries to open
>another,

Another? Has the writer close the file?

>they get an I/O Error 103.

To find more info on the subject error:
groups.google.com/groups&as_oq=&as_ugroup=borland.public.delphi.*

HTH, JohnH

PS: Maybe it is time to learn about classic databases.





 

Re:I/O Error 103

"John Luetich" < XXXX@XXXXX.COM >wrote
Quote
More explicitly, I have a table with a number that gets incremented every
time a text file report is generated (the number goes into the filename),
so the names are unique, and yet sometimes, not always, I/O 103 appears.
John L,
What kind of table?
What kind of access to it or database manager?
During what step does the error occur?
Rgds, JohnH
 

Re:I/O Error 103

Here's my code. the tables are Paradox but I don't think it makes any
difference
with tblzprntid do begin
tmpprnt1 := fieldbyname('prntID').asInteger;
tmpprnt2 := tmpprnt1 + 1;
edit;
fieldbyname('prntID').asInteger := tmpprnt2;
post;
end;
stprntID := inttostr(tmpprnt2);
stpath2 := 'h:\hidedocs\p' + stprntID + '.txt';
Assignfile(f,stpath2);
Rewrite(f);
writeln(f,'
' + sttoday2);
...................
finally
Flush(f);
closefile(f);
end;
stpath1 := 'C:\Program Files\microsoft office\office10\winword.exe' + ' ' +
stpath2;
try
pc := stralloc(length(stpath1)+1);
StrPCopy(pc,stpath1);
iError := WinExec(pc,SW_SHOWNORMAL);
if iError < 32 then
ShowMessage('Error # ' + IntToStr(iError) +
' occurred.');
finally
StrDispose(pc)
end;
"Bill Todd" < XXXX@XXXXX.COM >wrote in message
Quote
Are you getting an error when you open the file?

Do you have file I/O exceptions enabled with {$I+}?

Do you know what statement causes the error?

This may be a timing error if your code creates the file and tries to
open it immediately thereafter. You might try adding a time delay
between creating and opening the file.

--
Bill Todd (TeamB)
 

Re:I/O Error 103

John Luetich wrote:
Quote
I suspect closefile is the culprit.
I cannot see how that is possible since your code writes to the file
immediately before closing it. The file must be open or the write would
have failed. The write could be causing the error if there was a
problem opening the file. What is the complete text of the error
message that you get? Are you getting an EInOutError exception?
--
Bill Todd (TeamB)
 

Re:I/O Error 103

More info:
I added a second button executing the same report, but bringing it up in
Wordpad.
If I get 103 in Word, I also get it in Wordpad.
I'll try the time delay.
Thanks
Quote
Do you know what statement causes the error?

This may be a timing error if your code creates the file and tries to
open it immediately thereafter. You might try adding a time delay
between creating and opening the file.

--
Bill Todd (TeamB)
 

Re:I/O Error 103

Quote
If I get 103 in Word, I also get it in Wordpad.
John L,
Then, I don't think that your error has anything to do with
databases. Have you looked up meaning of error 103 yet?
--JohnH
 

Re:I/O Error 103

I suspect closefile is the culprit.
103 File not open Reported by CloseFile, Read Write, Seek, Eof, FilePos,
FileSize, Flush, BlockRead, or BlockWrite if the file is not open.
"John Herbster" <herb-sci1_at_sbcglobal.net>wrote in message
Quote
>If I get 103 in Word, I also get it in Wordpad.

John L,
Then, I don't think that your error has anything to do with
databases. Have you looked up meaning of error 103 yet?
--JohnH


 

Re:I/O Error 103

John Luetich wrote:
Quote
How do I insert a delay? I've looked at the WAIT statements and
they're not what I want. I remember a parameter for seconds.
See the Sleep procedure in the on-line help. I hope that works because
I am out of ideas.
--
Bill Todd (TeamB)
 

Re:I/O Error 103

It's a very small dialog box with the app name on the banner, below a red
M&M with an X on it , and the text only says "I/O Error 103"
How do I insert a delay? I've looked at the WAIT statements and they're not
what I want. I remember a parameter for seconds.
Thanks
John
"Bill Todd" < XXXX@XXXXX.COM >wrote in message
Quote
John Luetich wrote:

>I suspect closefile is the culprit.

I cannot see how that is possible since your code writes to the file
immediately before closing it. The file must be open or the write would
have failed. The write could be causing the error if there was a
problem opening the file. What is the complete text of the error
message that you get? Are you getting an EInOutError exception?

--
Bill Todd (TeamB)
 

Re:I/O Error 103

Bill and John L,
The following code executes without problem under WinXP SP2.
Rgds, JohnH
Var FNbr: integer;
Procedure TForm1.Button5Click(Sender: TObject);
var F: TextFile; stpath1, stpath2: string; iError: integer;
begin
Inc(FNbr);
stPath2 := Format('C:\Temp\Temp%3.3D.TXT',[FNbr]);
AssignFile(F,stpath2);
ReWrite(F);
WriteLn(F,'File Path = ' + stPath2);
// Flush(F); The flush is not required. The close will do it.
CloseFile(F);
stpath1 := 'C:\Program Files\Microsoft Office\Office10\winword.exe'
+ ' ' + stpath2;
iError := WinExec(PChar(stPath1),SW_SHOWNORMAL);
if iError < 32
then ShowMessage('Error # ' + IntToStr(iError) + ' occurred.');
end;