Advertisement
Guest User

Untitled

a guest
Sep 21st, 2017
57
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.61 KB | None | 0 0
  1. public class DatabaseUsage
  2. {
  3. //TODO
  4. //Create stored procedure (watch video online)
  5. public DatabaseUsage ()
  6. {
  7. //Stored the connection string in the object myConnection (it is static so it can be used by the static methods here)
  8. private SqlConnection myConnection = new SqlConnection(ConfigurationManager.ConnectionStrings["myDbConnection"].ToString());
  9.  
  10. //This is used to store the sql among the different methods
  11. private static SqlCommand myCommand = new SqlCommand();
  12.  
  13.  
  14. //Used to read data from the sql statements
  15. private static SqlDataReader myReader;
  16. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement