我的代码如下为Access 2010.这是一个简单的密码重置表单。我告诉它要设置密码的方法,但是当我查看表格时,值为" 9.63258661963259E + 44"它将整数更改为小数。为什么会这样?
Option Compare Database
Private Sub cmdPasswordReset_Click()
Dim dbre As Database
Dim qre As QueryDef
Set dbre = CurrentDb
empID = Me.cmbEmpPassChange
sqlString = "Update Employee"
sqlString = sqlString + "SET Password = 963258661963258661963258661963258661963258661 "
sqlString = sqlString + " where ID = " & empID & ";"
dbre.Execute sqlString, dbFailOnError
End Sub
答案 0 :(得分:0)
这不是小数,而是指数(科学)表示。
但是,将其设置为字符串并括起字段名称,因为它是保留字:
sqlString = sqlString & " SET [Password] = '963258661963258661963258661963258661963258661'"