When accessing the database in the middle layer, I want to read the data from the database in DataReader using the Command mode, but I can't succeed, do you have any way you have. (I don't want to use Adapter mode) My code is as follows.
[WebMethod]
Public system.data.sqlclient.sqldatarader getData ()
{
System.data.sqlclient.sqldataReader Reader; // = new system.data.sqlclient.sqldataReader ();
SqlConnection.Open ();
SQLCommand.commandtext = "SELECT TOP 1 * from authors";
Reader = SQLCommand.executeReader ();
Reader1 = Reader ["ID"]. TOSTRING ();
Return Reader;
}