Quantcast
Channel: Programming Forums
Viewing all articles
Browse latest Browse all 51036

How to clear variable value after logout?

$
0
0
I have declared a variable in module so that I can use it whenever I needed in my program,in that variable I have stored a username ,so that any user who is logged in can change the password (nobody else)

CODE:
Module Module1
    Public u As String
End Module


and I have used this variable in this code like this to hold the username

CODE:
      con.Open()
            cmd.Connection = con
            cmd.CommandText = "SELECT * FROM tbllogin where username = '" & TextBox1.Text & "'  and password = '" & TextBox2.Text & "';"
            u = TextBox1.Text
            cmd.Connection = con
            adaptor.SelectCommand = cmd
            adaptor.Fill(dataset, "O")
            


Now how can I flush the variable value after logout?

I have used
u= ""
but it didn't work

Viewing all articles
Browse latest Browse all 51036

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>