assassinator
5th November 2008, 04:59
With existed local file, I want to use add mode to write the new records at the end of file.

file.no = seq.open.local(file.name, "a", false)

But the file.no would return 0(I had tested wether the local file exists or not, the return value always is 0). I found the return value >= 0 means success(written in the BaanERP Programmers Guide). In fact, when the 0 return value, it neight create nor read the file. Anyone use it like this?

PS:
I found this program also with file.cp().:confused:

george7a
5th November 2008, 11:42
Hi,

This was discussed before her:
http://www.baanboard.com/baanboard/showthread.php?t=27682&highlight=seq.open.local+append

- George

assassinator
6th November 2008, 03:53
OK! Thank you for your reply.
So many predefined variables and functions are deprecated. Though some of them still would work, some would not. Rats!

As the seq.open.local() does not work in append mode, how I get it come true? Use seq.open(), client2server() and server2client() between local and server is so stupid. And use client2server(), the size of local file is not allowed greater than about 5MB(this is another idiotism).

george7a
6th November 2008, 09:25
As the seq.open.local() does not work in append mode, how I get it come true? use seq.open then copy the file to the local using client2server(). when you want to append, use seq.open again, and again client2server(). I do not know any other solution. I did not check if they fixed that bug in a certain SP either. You might want to check that.

mark_h
6th November 2008, 15:53
I do it just like George says - I could never get the local options to work with reliability. So what I do is client2server, append or write files, then server2client to put the file back. Just made it easier.