OLEDB Problem

Discussion in 'ASP.NET / ASP.NET Core' started by silkkeng, Dec 20, 2005.

Thread Status:
Threads that have been inactive for 5 years or longer are closed to further replies. Please start a new thread.
  1. Hi all,


    I got the strange issues here.
    First I usecode below to check the user existances and then if on executescalar it does return a value instead of NULL, then i will have to update the password.

    This are access store procedures.
    The strange problem is there is no error during the executing of the code, but, it just didnt update the data.
    If i manually go and update by clicking the updatequery on access, it does works fine.

    does anyone every experiences this problem ?



    Dim cmd As New OleDb.OleDbCommand("USER_VERIFICATIONCHECK", cn)


    cmd.CommandType = CommandType.StoredProcedure


    cmd.Parameters.Add("@Email", OleDbType.VarChar)


    cmd.Parameters("@Email").Value = cs.Email.ToString


    cmd.Parameters("@Email").Direction = ParameterDirection.Input


    cmd.ExecuteNonQuery()


    Dim temp


    temp = cmd.ExecuteScalar


    cmd.Dispose()


    If IsDBNull(temp) = True Or Len(temp) = 0 Then


    Return False


    Else


    Dim tempstr As String


    tempstr = DataModule.PasswordRecovery(cs.Email.ToString)


    If tempstr <> "ERROR" Then


    cmd = New OleDb.OleDbCommand("USER_NEWPASSWORD", cn)


    cmd.CommandType = CommandType.StoredProcedure


    cmd.Parameters.Add("@UserID", OleDbType.Integer)


    cmd.Parameters("@UserID").Value = CType(temp, Integer)


    cmd.Parameters("@UserID").Direction = ParameterDirection.Input


    cmd.Parameters.Add("@Pwd", OleDbType.VarChar)


    cmd.Parameters("@Pwd").Value = CType(tempstr, String)


    cmd.Parameters("@Pwd").Direction = ParameterDirection.Input


    cmd.ExecuteNonQuery()


    cmd.Dispose()


    Return True


    Else


    Return False


    End If


    End If
     
Thread Status:
Threads that have been inactive for 5 years or longer are closed to further replies. Please start a new thread.

Share This Page