This is because the FileOpen function is returning -1, ie it
is unable, for some reason, to open a text file. I've been
able to recreate the error in our office by writing the text
file to a folder with no read permissions (using windows
security). All the security settings on the client site,
however, seem fine.
A prototype that I originally developed worked fine on the
client site. It is only when I've incorporated the code into
the main application that it fails.
Any suggestions would be gratefully received.
Do you verify that the file exists before opening it? Do you use the
full path while opening it? Try doing a FileExists on the exact file
that you want to open for extra validation.
Brad
I'm already using FileExists. The file, which is created by
a seperate Java application, definitely exists. As I said,
the built app works in our own environment but not on the
client site. It's really a deployment issue, I think, rather
than a coding issue. I was just hoping tha someone else
might have had a similar problem in the past.
Thanks for the response.
Iain suggested that:
> , >>>>>ie it is unable, for some reason, to open a text
//Local external function
Function boolean SetFileAttributesA (ref string filename, ulong attrib)
library "KERNEL32.DLL"
//Code to access file
String ls_file
ls_file = 'C:\somefile.txt'
SetFileAttributesA (ls_file, 0)
FileDelete(ls_prp)
I hope this solve it for your.
Brad
hth
<Iain> wrote in message news:41933f61.290...@sybase.com...
Pritam