Yara
Yara

Reputation: 27

Vb6 inserting password as a text box in a database

I have form of student registration and i have one password text box and I set the property PasswordChar * In insert query I have write this statement

INSERT INTO student (student_id,first_name,Last_name,Email,password ) VALUES (' " & Text1.Text & " ' , ' " & Text2.Text & " ' , ' " & Text3.Text & " ',' " & Text4.Text & " ', ' " & Text5.Passwordchar & " ')"

When I test it i write 99999 as password but in my database is stored * and when I'm trying to login using the student id and the password I entered before giving me error Is the insert of value password correct or not ?

Upvotes: 0

Views: 264

Answers (1)

froque
froque

Reputation: 464

You are using the wrong property. PasswordChar is the character used to hide the password on the screen. See Using the Text Box Control

PasswordChar specifies the character displayed in the text box. For example, if you want asterisks displayed in the password box, you specify * for the PasswordChar property in the Properties window. Regardless of what character a user types in the text box, an asterisk is displayed

You can get the value using the Text property.

Upvotes: 1

Related Questions