mysql - Vb6将密码作为文本框插入数据库中

标签 mysql vb6

我有学生注册表格,并且有一个密码文本框,我设置了属性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/

相关文章:

java - MySQL中逐行添加和多行添加之间最快的是什么

mysql - 解决此推进 "Cannot redeclare function"错误的最正确方法是什么?

vb6 - 为什么要在 VB6 中同时声明 Let 和 Set 属性访问器

mysql - VB6 在模块中声明网页浏览器

VB6:从文件路径获取文件夹名称的简单方法

php - 如何使用间隔将mysql日期字段与今天+30天进行比较

mysql - MAX() 和 GROUP BY,需要整个结果的 COUNT(*)

vb6 - 用于分析 VB6 源代码的工具(如从 SciTools 中理解)

ssl - 我如何在 Jmail 中发送 SSL 电子邮件?

java - 如何使用Java从MySQL获取实时数据