我有学生注册表格,并且有一个密码文本框,我设置了属性PasswordChar *
在插入查询中我写了这个语句
INSERT INTO student (student_id,first_name,Last_name,Email,password ) VALUES (' " & Text1.Text & " ' , ' " & Text2.Text & " ' , ' " & Text3.Text & " ',' " & Text4.Text & " ', ' " & Text5.Passwordchar & " ')"
当我测试它时,我写了 99999 作为密码,但在我的数据库中存储了*
,当我尝试使用学生 ID 和我在出现错误之前输入的密码登录时
插入的值密码是否正确?
最佳答案
您使用了错误的属性。 PasswordChar 是用于在屏幕上隐藏密码的字符。请参阅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
您可以使用 Text 属性获取值。
关于mysql - Vb6将密码作为文本框插入数据库中,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/41223829/