Advertisement
Guest User

Untitled

a guest
Mar 18th, 2019
60
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.42 KB | None | 0 0
  1. SqlConnection Cn = new SqlConnection(ConfigurationManager.ConnectionStrings["MyConnection"].ToString());
  2.  
  3. public DataTable D_listado()
  4. {
  5. SqlCommand CMD = new SqlCommand("sp_listar", Cn)
  6. {
  7. CommandType = CommandType.StoredProcedure
  8. };
  9. SqlDataAdapter da = new SqlDataAdapter(CMD);
  10. DataTable dt = new DataTable();
  11. da.Fill(dt);
  12. return dt;
  13. }
  14. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement