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

 

public void RemoteRtvCommand ( System.String strRtvCommand )

 

This method is designed to call "retrieve" kind of commands. This is useful to call simple programs and retrieve some data from them. For more complex program calls, you should use stored procedures (Easycom or SQL procedures).

 

 

In this example we use a system command (RTVJOBA) to retrieve some AS/400 specific options.

 

Example (VB):

 

mycnx.RemoteRtvCommand("RTVJOBA USER(&USR) USRLIBL(&USRL)")

 

If mycnx.RemoteRtvCommandGetValue("RC") = "0" Then

l_user.Text = mycnx.RemoteRtvCommandGetValue("USR")

l_job_usrlibl.Text = mycnx.RemoteRtvCommandGetValue("USRL")

Else

MessageBox.Show("Error returned by Rtv Command: " + mycnx.RemoteRtvCommandGetValue("RC"), Me.Text)

End If

 

 Example (C#):

 

mycnx.RemoteRtvCommand("RTVJOBA USER(&USR) USRLIBL(&USRL)");

 

If (mycnx.RemoteRtvCommandGetValue("RC") == "0")

{

l_user.Text = mycnx.RemoteRtvCommandGetValue("USR");

l_job_usrlibl.Text = mycnx.RemoteRtvCommandGetValue("USRL");

}

Else

{

MessageBox.Show("Error returned by Rtv Command: " + mycnx.RemoteRtvCommandGetValue("RC"));

}