SQLDataReader Return reader


/ Published in: C#
Save to your folder(s)



Copy this code and paste it in your HTML
  1. public static SqlDataReader Title()
  2. {
  3. SqlConnection connection = ConnectionManager.GetConnection();
  4.  
  5. var command = new SqlCommand("StoredProcedure", connection);
  6.  
  7. command.CommandType = CommandType.StoredProcedure;
  8.  
  9. SqlDataReader reader = command.ExecuteReader(CommandBehavior.CloseConnection);
  10.  
  11. return reader;
  12. }

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.