Welcome to Dream.In.Code
Become a VB.NET Expert!

Join 150,072 VB.NET Programmers for FREE! Get instant access to thousands of VB.NET experts, tutorials, code snippets, and more! There are 1,780 people online right now. Registration is fast and FREE... Join Now!




Password Validation

 
Reply to this topicStart new topic

Password Validation

d4t4ch17d
5 Feb, 2008 - 10:56 AM
Post #1

New D.I.C Head
*

Joined: 31 Jan, 2008
Posts: 39


My Contributions
I was searching on the web for information on how to validate an entry in a textbox as a valid password before proceeding.

I fould this code:
CODE

Private Function PasswordInvalid(ByVal user_name As String, _
    ByVal password As String) As Boolean
    Return (user_name <> password)
End Function


I don't actually know how to use it. I really don't understand the
CODE

    Return (user_name <> password)


I want to enter a password that it checks user input with. I guess it would be something like:
CODE

Private Function PasswordInvalid(Byval password As String) As Boolean
If txtPassword.Text ==false then
    Return False;
Elseif txt.Password.Text = test then
    Return True;
End If

Ahaha I have no real idea, just pulling stuff out of my ass I guess, I am a real beginner and just trying to understand this, I hope someone can kind of figure out what I am trying to do in "my code"......
User is offlineProfile CardPM
+Quote Post

PsychoCoder
RE: Password Validation
5 Feb, 2008 - 11:04 AM
Post #2

using DIC.Core;
Group Icon

Joined: 26 Jul, 2007
Posts: 9,483



Thanked: 161 times
Dream Kudos: 9075
Expert In: VB, VB.Net, C#, SQL, ASP, ASP.Net, Web Development, HTML, CSS, Win32 API, Javascript, mySQL, J#, Boo.Net

My Contributions
If I understand your question correctly, and since I don't know which Database you're using I will post the link to 2 tutorials:



Both of those tutorials will show you how to interact with the database, and how to retrieve records based on values passed to the database, this will show you how to create a user login and compare their username and password to data in your table.

Read through the tutorial for your flavor database, then give the examples a try and if you run into problems post the code you're having a problem with (in code tags like so code.gif ) and any errors you may be receiving, or what the code is doing versus what you want it to do and we will help you as much as we can smile.gif
User is offlineProfile CardPM
+Quote Post

d4t4ch17d
RE: Password Validation
5 Feb, 2008 - 11:12 AM
Post #3

New D.I.C Head
*

Joined: 31 Jan, 2008
Posts: 39


My Contributions
So the only way to validate passwords would be through a database? I am not trying to make someone for corporate use, just personal use. I thought I could just but the password in the program, but if I need to use a database I'll learn that! Thanks so much for your direction.
User is offlineProfile CardPM
+Quote Post

Fast ReplyReply to this topicStart new topic
Time is now: 1/8/09 11:05PM

Be Social

Dream.In.Code RSS Feed Dream.In.Code LinkedIn Group Follow Us On Twitter

Live VB.NET Help!

VB.NET Tutorials

Reference Sheets

VB.NET Snippets

DIC Chatroom

Bye Bye Ads

Monthly Drawing

Thumb Drive

Top Contributors

Top 10 Kudos This Month