i have one registration form which consists of username, password, confirmpassword and Register button.
When i will be typing the username, it should show whether the username is available or not. and i have changed the username column as primary key in sql database.
Private Sub txtusername1_KeyUp(ByVal sender As System.Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles txtusername1.KeyUp
Dim da As New SqlDataAdapter("select * from Register", con)
da.Fill(ds, "Register1")
If txtusername1.Text = ds.Tables("Register1").Rows(0)(0).ToString Then
lblusernameerror.Text = "Username is not available,choose another"
Else
lblusernameerror.Text = "Username is available"
End If
End Sub
In the Bolded line, it is reading only one username but i need to read all the columns....
here i have written key up event in the text box of username, but here it is loading only one username...
I am using visual basic 2008 and i am writing the program in disconected architecture in vb.net
thanks in advance..
please help me soon
Last edited: