CLEAR the Table "login" on closing of the form

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Sixx
    New Member
    • Oct 2011
    • 1

    CLEAR the Table "login" on closing of the form

    Trying to CLEAR the Table "login" on closing of the form...

    Code:
     public void remTempData()
            {
                string delete = "DELETE * FROM login";
                SqlCommand rMove = new SqlCommand();
                rMove.Connection = access;
                rMove.CommandType = CommandType.Text;
                rMove.CommandText = delete;
                rMove.ExecuteNonQuery();
            }
    
      private void frmPN_FormClosed(object sender, FormClosedEventArgs e)
            {
              remTempData();
              Application.Exit();
            }
    please help
    Last edited by Niheel; Oct 13 '11, 12:56 AM.
  • GaryTexmo
    Recognized Expert Top Contributor
    • Jul 2009
    • 1501

    #2
    You'll have to tell us what happens when you do this... does the table just not clear out? Are there any exceptions that happen?

    Comment

    Working...