Hi
I am currently programming a system where I can send orders from Navision Attain 3.70 to a linux server via sockets.
I am using the Attain communication components and everything is working fine. I can send the order and get the return message from the server. So fare so good.
But because the system is going to run “automated” in a job scheduler I would like to make it a little more stable towards potential errors. So the first thing I tried was to stop the socket server. And there my problem start. I get a windows error when I do the
OutS := Outmsg.GetStream;
Call.
Are there any way to check that the socket connection is running and catch that status in C/AL code so that I can make my system more stable?
I thought I could you the win socket ocx but when I try to use it from Navision I get a message that I need to use a developer license for the ocx?? Anybody know how I get this?
0
Comments
I created a codeunit that calls my socket logic with and if around the run.
Now I can catch that there is an error (just not the details about what the error is).
I would still like info why winsocket don't work from within C/AL if anybody knows the answer.
There is nothing in the standard Navision objects that allows you to open a continuous socket connection. We had to write our own .NET component to monitor a socket connection and 'convert' the process into something that Navision would understand (we use MSMQ for that part).
RIS Plus, LLC
I think that my dirty solution will do the job, else you are right then I will have to program my own dll to do the job.
Wierd that navision only make such a light implementation of a interface, I would have thought that all people need some kind of error handling in their code.
The way I see it... if you're going to expose an object, expose the entire thing. Instead, Navision esposes only parts of them, and sometimes even changes the interface as well.
RIS Plus, LLC