desperateboy
Active member
- Joined
- Dec 11, 2007
- Messages
- 30
- Programming Experience
- Beginner
hi friends,
I have made login form.After login when i logout then again login that time without filling username and password show main form during clik on login button.
Plz sort it out.
I am using following coding:
I have made login form.After login when i logout then again login that time without filling username and password show main form during clik on login button.
Plz sort it out.
I am using following coding:
VB.NET:
Try
conn.Open()
cmd = New SqlCommand("select * from usrs where uname = @user and upwd = @pwd", conn)
cmd.Parameters.AddWithValue("@user", Trim(TextBox1.Text))
cmd.Parameters.AddWithValue("@pwd", Trim(TextBox2.Text))
dr = cmd.ExecuteReader
While dr.Read()
a = dr.Item("upwd")
b = dr.Item("uname")
If TextBox1.Text = a And TextBox1.Text = b Then
sid = dr.Item("uid")
ProgressBar1.Visible = True
'Button1.Visible = False
'Button2.Visible = False
valid = True
Me.TextBox1.Clear()
Me.TextBox2.Clear()
End If
End While
dr.Close()
Catch ex As Exception
MsgBox(ex.Message)
Finally
conn.Close()
cmd = Nothing
End Try
Last edited: