PreviousNext
Help > Easycom .NET > System.Data.EasycomClient namespace > EacConnection > EacConnection methods > EacConnection.RemoteCommand(System.String)
EacConnection.RemoteCommand(System.String)

 

public void RemoteCommand ( System.String strCommand )

 

This method is designed to run an AS/400 command. If the command fails, an Easycom.Core.EasycomException is thrown.

 

Example (VB):

 

Try

mycnx.RemoteCommand("ADDLIBLE MYLIB")

Catch except As Exception

MessageBox.Show("Error while executing command : " + except.Message, Me.Text)

End Try

 

 Example (C#):

 

Try

{

mycnx.RemoteCommand("ADDLIBLE MYLIB");

}

Catch (EasycomException e)

{

       MessageBox.Show("Error while executing command : " + e.Message);

 

}

 

 

 See also: EasycomConnection.RemoteCommand