i am using back end as oracle
now i am generating encrypted password for a particular user ids
if i use the following code as MSACCESS as back end then it is working fine
but if i am working oracle as back end
then its not working
first u need to import following
imports system.data.oledb
imports system.web.security
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
t1 = CInt(TextBox1.Text)
t2 = TextBox2.Text
Try
ss1 = FormsAuthentication.HashPasswordForStoringInConfigFile(t2, "SHA1")
cn.Open()
ss = "insert into logdet1 values(" & t1 & ",'" & ss1 & "')"
cmd = New OleDbCommand(ss, cn)
cmd.ExecuteNonQuery()
Response.Write("PASSWORD IS SAVED IN ENCRYPTED FORM")
Catch ex As Exception
Response.Write(ex.Message)
End Try
cn.Close()
End Sub
now i have written the code for updating the encrypted in oracle as follows
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
Try
cn.Open()
sss = "update bbb set bb=@bb1 where aa=cint(" & textbox1.text & ")"
cmd1 = New OleDbCommand(sss, cn)
cmd1.Parameters.Add("@bb1", TextBox2.Text)
cmd1.ExecuteNonQuery()
Response.Write("UPDATED")
Catch ex As Exception
Response.Write(ex.Message)
End Try
cn.Close()
End Sub
i just want to know where the error is
thanks
now i am generating encrypted password for a particular user ids
if i use the following code as MSACCESS as back end then it is working fine
but if i am working oracle as back end
then its not working
first u need to import following
imports system.data.oledb
imports system.web.security
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
t1 = CInt(TextBox1.Text)
t2 = TextBox2.Text
Try
ss1 = FormsAuthentication.HashPasswordForStoringInConfigFile(t2, "SHA1")
cn.Open()
ss = "insert into logdet1 values(" & t1 & ",'" & ss1 & "')"
cmd = New OleDbCommand(ss, cn)
cmd.ExecuteNonQuery()
Response.Write("PASSWORD IS SAVED IN ENCRYPTED FORM")
Catch ex As Exception
Response.Write(ex.Message)
End Try
cn.Close()
End Sub
now i have written the code for updating the encrypted in oracle as follows
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
Try
cn.Open()
sss = "update bbb set bb=@bb1 where aa=cint(" & textbox1.text & ")"
cmd1 = New OleDbCommand(sss, cn)
cmd1.Parameters.Add("@bb1", TextBox2.Text)
cmd1.ExecuteNonQuery()
Response.Write("UPDATED")
Catch ex As Exception
Response.Write(ex.Message)
End Try
cn.Close()
End Sub
i just want to know where the error is
thanks