Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6384059
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T02:43:37+00:00 2026-05-25T02:43:37+00:00

Basically i am trying to create a programme, which needs to have some authorisation.

  • 0

Basically i am trying to create a programme, which needs to have some authorisation.

When the application starts up, it starts straight into the login screen.

I want the Username and Password textboxes to read the database and if they match then progress to the next form but if they dont match then a message box will appear.

I also want to create groups of people so if a certain group of people log in they go to a certain form and if the another group of people log in i want them to go to a different form.

Also i want the password box to be * instead of visable text.

Can any one help, this is my code so far…

dbProvider = “PROVIDER=Microsoft.Jet.OLEDB.4.0;”
dbSource = “Data Source = D:/Users.mdb”

    con.ConnectionString = dbProvider & dbSource

    con.Open()


    sql = "SELECT * FROM tblUsers"
    da = New OleDb.OleDbDataAdapter(sql, con)
    da.Fill(ds, "Users")

    con.Close()

    MaxRows = ds.Tables("Users").Rows.Count
    inc = -1


    If UserIDTextBox.Text = ds.Tables("tblUsers").Rows(0).Item("UserID") & User_PasswordTextBox.Text = ds.Tables("tblUsers").Rows(0).Item("Password") Then
        MsgBox("This have worked correctly!")
    Else
        MsgBox("This has not worked, try again!")
    End If
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-25T02:43:38+00:00Added an answer on May 25, 2026 at 2:43 am

    The first and most important thing you need to know is that it’s almost always a bad idea to code your own authentication system. It’s just so easy to do this in ways that seem to be right and even pass all your tests, but still have subtle, hard to spot errors that won’t show up until a year later when you find out you were cracked six months ago. Always lean as much as possible on whatever authentication features are made available to you in your platform.

    The next thing you need to know is that you do not store passwords in the database. Ever. The correct way to handle password matching is to use a salt to alter the original password in some simple way so that simple dictionary passwords will now no longer result in values that can be easily reversed by a google lookup, and then use use a cryptographic hashing algorithm like bcrypt, scrypt, or (if your really have to) sha1. Do not use md5. Examples of this are readily available on google, and will explain it far better than I can here. When someone wants to log in, you perform the same steps on their attempted password and now compare only the hashes. If you’re not doing it this way, it’s only a matter of time before your user’s passwords become public knowledge.

    Next up I noticed a problem with your database connection handling in your code. The code you have is not guaranteed to close the connection. con.Close() should always be in a Finally block, and for preference I like the Using block shorthand.

    Finally, way near the bottom you try to use VB’s string concatenation operator (&) as a logical AND. Oops. You want to use the AndAlso operator here instead.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to create a Textmate snippet, but have run into some difficulties. Basically,
I recently came across this in some code - basically someone trying to create
I'm trying to create an application that triggers some code when the financial markets
Basically, I'm trying to create an object of unique objects, a set. I had
I'm having problem (basically, I'm confused.) while trying to create a worker thread for
i'm trying to create a program that generates images for use as multi-screen backgrounds,
I've got a problem with my shell script. I am basically trying to create
I have a C# application, and I need to dump some output to a
I'm trying to import a few libraries into my program (which is a google
I'm trying to create a Tile rendering program. Heres some basic code. Header class

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.