PreviousNext
Help > Easycom .NET > System.Data.EasycomClient namespace > EacCommand > EacCommand methods > EacCommand.ExecuteReader()
EacCommand.ExecuteReader()

 

public System.Data.IDataReader ExecuteReader ( )

 

This method immediately executes the command. It prepares it and passes parameters if needed, executes the query, and updates the output parameters.

 

It returns an EacDataReader object that allows fetching data and selecting next resultsets if any.

If there is no resultset at all, the function returns null.

 

Example (C#):

            EacConnection cnx;

     cnx = new EacConnection();

     EacCommand cmd = cnx.CreateCommand();

            cmd.CommandText = “SELECT * FROM Table”;

            EacDataReader data = (EacDataReader)cmd.ExecuteReader();