Trapping errors / SocketBusAdapter

Hi! I am trying to use the SocketBusAdapter (SBA) to connect to another program. This works fine as long as the other program is listening and ready, but this is not always the case. When you’re unable to connect to the other side, the SBA will show a message: “The stream has returned a write error”. We were hoping to run this unit unattended, so we need a way to get around this message. We have used the “The Navision Socket Bus Adapter - Sending a Document” example in the “Development Guide for Communication Components”. Is there a way to stop/ignore the messagebox? Is there a way to check if the connection is alive, without trying to send something? Any other ideas on how to do this? Regards, Paal

Hi, where can I find the “Development Guide for Communication Components” ? Dirk

Pal, I experienced the same problem “The stream has returned a write error” when using the MSMQ BusAdaptor. It did not effect to functioning of the communications and was simply reported to event log even though the process was working fine. Navision UK advised me to use the latest build versions on the BusAdaptor AND ComCom objects and the problem went away. I suspect the error is coming from the ComCom object as that would be the common element in both of our situations. May be you can try sourcing the latest build versions of the objects objects from Navision Norway? Dirk, I believe it is on the product CD. Best Regards, Chris.

Thanks for your reply! I’m not sure that the two scenarios are fully comparable. In my case there is an actual error, because there is no server to connect to. But I want it to fail “gracefully”, that is, not send me a messagebox… My version of ComCom is, is there a newer version to be found? Regards, Paal

Pal, It is the build number you need to look at, under file → properties when you browse to the dll in explorer. I was advised to use verion build no. 11557 to solve the problem I reported. Regrds, Chris.

Pal, Just checked my versions again and noted that the info I just posted was wrong. I was sent version on the COM objects by Navision UK. Unless any of the user group members are aware of the navision communication com objects being localised (I don’t think they are) I would gladly send you these if you would like to try them. Chris.

Chris, I would like to give it a shot. I’ve sent you an e-mail, with my adress. I don’t think the object is localised either. At least the properties of the file says “languageneutral” (translated from Norwegian). Regards, Paal