Executes the SQL statement (
TdCommand.CommandText property) and returns a
TdDataReader object.
The following example creates a
TdConnection and executes a SQL statement. An instance of
TdDataReader is returned. The calling method must close the
TdDataReader and the corresponding connection (cn.Close()).
public TdDataReader ExecuteQuery(string connectionString, string commandText,
out TdConnection cn)
{
cn = new TdConnection(connectionString);
cn.Open();
TdCommand cmd = new TdCommand(commandText, cn);
TdDataReader reader = cmd.ExecuteReader();
return reader;
}
Target Platforms: Windows 7, Windows 8, Windows 8.1, Windows 10, Windows Server 2008, Windows Server 2008 R2, Windows Server 2012, Windows Server 2012 R2