security - VB.NET executeScalar IF conditional -


call con_getsetting()     if con_open() = true         dim pass string         using cmd new sqlcommand("select pass_key m_user user_id='" + textbox1.text.replace("'", "").replace("--", "") + "'", con)             pass = cmd.executescalar             if pass <> nothing                 if pass = textbox2.text                     messagebox.show("login success!!, go main menu!", "djiesoft", messageboxbuttons.ok, messageboxicon.information)                     me.close()                 else                     counter += 1                     if counter <> 3                         messagebox.show("invalid password")                     else                         messagebox.show("invalid password" & vbnewline & "anda sudah 3x gagal melakukan login!")                         me.close()                     end if                 end if             else                 counter += 1                 if counter <> 3                     messagebox.show("invalid user id")                 else                     messagebox.show("invalid user id" & vbnewline & "anda sudah 3x gagal melakukan login!")                     me.close()                 end if              end if         end using     end if 

when typed exist data, showed "invalid password" ? sorry bad bad english. know how secure login sql server , language vb.net ?


Comments

Popular posts from this blog

windows - Single EXE to Install Python Standalone Executable for Easy Distribution -

c# - Access objects in UserControl from MainWindow in WPF -

javascript - How to name a jQuery function to make a browser's back button work? -