check for a password in a database

Posted on 2003-03-26
Medium Priority
Last Modified: 2013-12-25
How do I set it so that when i check for a password in a database it search's the entire columb?  I was thinking about if there was like a automatic .movenext file or something, but that only works if the user keeps on clicking Login until they get to the actual record.
Question by:TigerC
  • 4
  • 2

Author Comment

ID: 8209051

Expert Comment

ID: 8209134
is this a password for the DB or for another program (so the DB contains a list of users and their passwords?)

Author Comment

ID: 8209223
it is for a DB..Access, and yes
Get expert help—faster!

Need expert help—fast? Use the Help Bell for personalized assistance getting answers to your important questions.


Author Comment

ID: 8209230
I'm also curious on how i would set it so that if i press a command button then a given text box will output the greatest number of alike value's...
like if i had a Columb named Animals
and under animals i had
then the value would output cows ->2 because cows is the most common....

Accepted Solution

OblivionSY earned 150 total points
ID: 8209728
Its an SQL Command like..

SELECT top 1 Animal, Count(Animal) AS CountOfAnimal
FROM table1
ORDER BY Count(Animal) DESC;

This will pick out the animal with the most occurencies, if there are two animals with equal occurencies then both are returned. (just tested that in SQL)

I would suggest when asking the user to enter their name and password you check their name first, make sure there is an entry in the DB

"SELECT UserName FROM Users WHERE UserName = " & txtUserName.text

If something is found then the user exists.

Then get the password associated with that name,

"SELECT Password FROM Users WHERE UserName = " & txtUserName.text

then compare the result from that querry to what the user has entered, if it matches then ok, if not invlid pass

Is this the kind of thing you have in mind? pls clarify if I have missunderstood

Author Comment

ID: 8220672
if you could help me on having the visual basic program take input from the user as a login and a password from a database and be able to add users and take away users and have the login search for them from the entire list i would greatly appreciate and and give you some more points..Thanks
email is Canadakicksass_@hotmail.com

Featured Post

Get your problem seen by more experts

Be seen. Boost your question’s priority for more expert views and faster solutions

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

I’ve seen a number of people looking for examples of how to access web services from VB6.  I’ve been using a test harness I built in VB6 (using many resources I found online) that I use for small projects to work out how to communicate with web serv…
When trying to find the cause of a problem in VBA or VB6 it's often valuable to know what procedures were executed prior to the error. You can use the Call Stack for that but it is often inadequate because it may show procedures you aren't intereste…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

619 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question