在执行此代码时,我收到此错误:Syntax error in INSERT INTO statement.
这是我的代码:
Dim cmd As OleDbCommand = New OleDbCommand("INSERT INTO Users " & _
" (PKID, Username, Password, Email, PasswordQuestion, " & _
" PasswordAnswer, IsApproved," & _
" Comment, CreationDate, LastPasswordChangedDate, LastActivityDate," & _
" ApplicationName, IsLockedOut, LastLockedOutDate," & _
" FailedPasswordAttemptCount, FailedPasswordAttemptWindowStart, " & _
" FailedPasswordAnswerAttemptCount, FailedPasswordAnswerAttemptWindowStart)" & _
" Values (@PKID, @Username, @Password, @Email, @PasswordQuestion, @PasswordAnswer, @IsApproved, @Comment, @CreationDate, @LastPasswordChangedDate, @LastActivityDate, @ApplicationName, @IsLockedOut, @LastLockedOutDate, @FailedPasswordAttemptCount, @FailedPasswordAttemptWindowStart, @FailedPasswordAnswerAttemptCount, @FailedPasswordAnswerAttemptWindowStart)", conn)
cmd.Parameters.Add("@PKID", OleDbType.Guid).Value = providerUserKey
cmd.Parameters.Add("@Username", OleDbType.VarChar, 255).Value = username
cmd.Parameters.Add("@Password", OleDbType.VarChar, 255).Value = EncodePassword(password)
cmd.Parameters.Add("@Email", OleDbType.VarChar, 128).Value = email
cmd.Parameters.Add("@PasswordQuestion", OleDbType.VarChar, 255).Value = passwordQuestion
cmd.Parameters.Add("@PasswordAnswer", OleDbType.VarChar, 255).Value = EncodePassword(passwordAnswer)
cmd.Parameters.Add("@IsApproved", OleDbType.Boolean).Value = isApproved
cmd.Parameters.Add("@Comment", OleDbType.VarChar, 255).Value = ""
cmd.Parameters.Add("@CreationDate", OleDbType.DBTimeStamp).Value = createDate
cmd.Parameters.Add("@LastPasswordChangedDate", OleDbType.DBTimeStamp).Value = createDate
cmd.Parameters.Add("@LastActivityDate", OleDbType.DBTimeStamp).Value = createDate
cmd.Parameters.Add("@ApplicationName", OleDbType.VarChar, 255).Value = pApplicationName
cmd.Parameters.Add("@IsLockedOut", OleDbType.Boolean).Value = False
cmd.Parameters.Add("@LastLockedOutDate", OleDbType.DBTimeStamp).Value = createDate
cmd.Parameters.Add("@FailedPasswordAttemptCount", OleDbType.Integer).Value = 0
cmd.Parameters.Add("@FailedPasswordAttemptWindowStart", OleDbType.DBTimeStamp).Value = createDate
cmd.Parameters.Add("@FailedPasswordAnswerAttemptCount", OleDbType.Integer).Value = 0
cmd.Parameters.Add("@FailedPasswordAnswerAttemptWindowStart", OleDbType.DBTimeStamp).Value = createDate
有人可以解释我的代码中的问题吗?