Hi all,
to read some values from an external database (AS400), I create a OleDb-connection to the AS400. That works realy great as long as the AS400 is available. What I try to do now is catch the errors that come up when I open the OleDb connection and the remote system is not available.
Here's a code example:
CREATE(AdoConn);
AdoConn.ConnectionString('Provider=IBMDA400.DataSource.1;Data Source=192.168.2.25;User ID=xxx;password=yyy');
AdoConn.Open();
CREATE(AdoRS);
If the remote system is not available, in the line --AdoConn.Open();--
a error is raised, but I have found no way to catch it.
Can somebody help?
0
Comments
The codeunit is smth like that:
And then use it:
http://navisionfreak.blogspot.com/
Justas Janauskas