kathuria
12th December 2006, 11:40
Hi,
I wrote code as per my requirement. Two functions client2server and seq.fstat.local are not giving required output. I am also attaching code.
function extern process.barcode.data()
{
file="C:\outbound.txt"
file.rd()
}
function file.rd()
{
string bufr(256)
long buflen, fp,fp1,lent
long idc, idp, image
lent=1
fp = seq.open.local(file, "r",0)
if fp>=0 then
idc=seq.fstat.local(file,buflen)
file1=creat.tmp.file$(bse.dir$())
idp=client2server(file,file1,true,false,false)
fp1 = seq.open(file1, "r")
if fp1>=0 then
seq.rewind(fp1)
while not seq.eof(fp1)
seq.gets(stl,100,fp1)
endwhile
endif
seq.close.local(fp)
seq.close(fp1)
endif
}
same code is working fine with BaaN IV but not with SSA ERP LN 6.1 SP0. I have also included dll #pragma used dll ottdllbw.
This is urgent.
Regards,
Sanjay Kathuria
george7a
12th December 2006, 11:52
Hi,
Can you please explain what do you mean by "Two functions client2server and seq.fstat.local are not giving required output"?
What is the value of file1?
Was the file copied to the server?
What are the values of idp & fp?
- George
kathuria
12th December 2006, 11:58
Hi,
I am talking about two functions .
1. Client2server
2. seq.fstat.local
Value of file1 is creating temporary file into $BSE folder
It's not copying file.
value of idp is -32 and value of fp greater than 0
Regards,
Sanjay Kathuria
george7a
12th December 2006, 12:09
Hi again,
If you say that the file was not created at all, I think it might be a permission issue. Because this means that even creat.tmp.file$ failed!
error 32 means:
This error indicates that a write was made on a pipe for which there is no process to read the data. This condition normally generates a signal. The error is returned if the signal is ignored.
from:
http://www.baanboard.com/programmers_manual_baanerp_help_errors_32_EPIPE
- George
kathuria
12th December 2006, 12:27
Hi,
It's creating file but not copying the content of client file.
Regards,
Sanjay Kathuria
george7a
12th December 2006, 12:30
Hi,
Can you try to copy it to any other name:
idp=client2server(file,bse.dir$()&"/temp.tmp",true,false,false)Does it copy?
- George
kathuria
12th December 2006, 12:40
Hi,
Giving same error.
Regards,
Sanjay Kathuria
george7a
12th December 2006, 12:47
Hi,
I never saw error 32 before. However, this is what I have in a working code for LN 6.1:
idp=client2server(file,bse.dir$()&"/temp.tmp",0)
The changes are without the last two arguments & copy it in binary mode. Can you try it again and let us know?
- George
kathuria
12th December 2006, 13:00
Hi,
I am getting same error but same code is working with baan IV. Are you using SP0 or more than SP0.
Can you please tell me file size of ottdllbw
REgards,
Sanjay Kathuria
george7a
12th December 2006, 13:09
Hi,
Yes I am sure it worked on SP0. This script worked on SP0 100%
The current odllbw size is 26 KB
One more thing I see your client file was opened for read. Can you close the file then copy it to the server?
- George
wiggum
12th December 2006, 13:14
Is LN on an other OS as BaanIV? Perhaps you should close the local file before copying it.
kathuria
12th December 2006, 13:15
Hi,
Thanks. At last problem solved.
Regards,
Sanjay Kathuria
NirajKakodkar
13th December 2006, 08:48
Hi ,
I feel your client2server function is not getting executed properly bcoz of permission issue and a file is created because of your creat.tmp.file function .
Regards,
Niraj