HAL to save an attached file to client
Paul Timms
10-10-19
I am struggling to write HAL code which simply takes an attach file from a record and saves it onto the client. The issue appears to be related to the size of the attach file, since below a certain size, my code works correctly.

The code to find the attach file runs on the server, and works fine. The only way I have found to save that file to the client is to run AddAttachFileToArea, then use ClientRemoteAsync.ClientProcedure(filename,area), which runs WriteAreaToFile. The issue is that if the area is above a certain size (somewhere between 300kb and 390kb) the procedure does not run at all.

I have tried sending the Attach2Vc to the client procedure and then using AddAttachFileToArea but this creates a zero byte file on the client.

I then tried, from the client procedure, a remote call to another procedure which does AddAttachFileToArea with a variable area feeding back to the client procedure. This has the same problem as originally, i.e. it only works if the area is below a specific size.

Without ClientRemoteAsync the functions WriteAreaToFile, OutAreaToFile, LogAreaToFile and AppendAreaToFile all write the file to the server.

Does anyone have any ideas? Maybe there's a different way to achieve this?
Leave Comment
You can subscribe to notifications for this post by selecting the 'star' icon on the top right corner of the post.
Latest Posts
Bror-Erik Kotiranta
I will have a programmer answer this one, I do not have the full answer for this...
14:23 25 Jan 2025
Bror-Erik Kotiranta
I meant that file you were looking it, forgot the actual name sorry about that. But that file, if you change the IP to the correct one, does it then connect?...
14:21 25 Jan 2025