Welcome to Dream.In.Code
Getting VB.NET Help is Easy!

Join 132,141 VB.NET Programmers for FREE! Get instant access to thousands of VB.NET experts, tutorials, code snippets, and more! There are 2,067 people online right now. Registration is fast and FREE... Join Now!




Username and password in VB.Net

 
Reply to this topicStart new topic

Username and password in VB.Net

gjay
post 9 Oct, 2008 - 07:15 PM
Post #1


New D.I.C Head

*
Joined: 9 Oct, 2008
Posts: 1

CODE

Private Sub Button1_Click(ByVal sender As System.Object. ByVal e As System.EventArgs) Handles Button1.Click
Dim Student, geejay As String
If Me.TextBox1.Text="Student" And Me.TextBox2="geejay" Then
MsgBox ("You may Start using the system")
me.Hide()
Form2.Show()
Else
MsgBox("Wrong Username/PAssword",1)
End If
End Sub

User is offlineProfile CardPM

Go to the top of the page

PsychoCoder
post 9 Oct, 2008 - 07:28 PM
Post #2


using DIC.Core;

Group Icon
Joined: 26 Jul, 2007
Posts: 8,919



Thanked 117 times

Dream Kudos: 8475

Expert In: VB, VB.Net, C#, SQL, ASP, ASP.Net, Web Development, HTML, CSS, Win32 API, Javascript, mySQL, J#, Boo.Net

My Contributions


Are you receiving any errors? Does this code not work that way you intended it? When asking for help there are a couple items that are vital in order for someone to properly help you:

  • Post the code you're having problems with (DONE)
  • Post the exact error you're receiving, if you are receiving one
  • If no error explain what the code is doing versus what you want it to do
  • Post your question in the body of your post, not the description field
User is online!Profile CardPM

Go to the top of the page

xkermit
post 10 Oct, 2008 - 12:14 AM
Post #3


New D.I.C Head

*
Joined: 12 Oct, 2007
Posts: 15


My Contributions


QUOTE(gjay @ 9 Oct, 2008 - 08:15 PM) *

CODE

Private Sub Button1_Click(ByVal sender As System.Object. ByVal e As System.EventArgs) Handles Button1.Click
Dim Student, geejay As String
If Me.TextBox1.Text="Student" And Me.TextBox2="geejay" Then
MsgBox ("You may Start using the system")
me.Hide()
Form2.Show()
Else
MsgBox("Wrong Username/PAssword",1)
End If
End Sub



your code looks good for me. Sorry I can't help.

btw, i need some help for login form using Access database.
I have been doing this so far and can't go any further since I don't have any idea how to check the database and compare it one by one.

This is my code
CODE

        Dim conn As OleDb.OleDbConnection
        Dim connectionString As String = "Provider=Microsoft.Jet.OLEDB.4.0;_
        Data Source=.\Resources\Respondent.mdb;Jet OLEDB:Database Password=xxx"

        conn = New OleDb.OleDbConnection(connectionString)
        conn.Open()

        //This is where I don't have any idea how to get the data from access, compare
        //the username, check the password and compare them, pass it back to the
        //VB2005 and do the autentification process

        conn.Close()
        conn.Dispose()


I'm not sure how to compare queries with text component in the textbox.

Any idea?
User is offlineProfile CardPM

Go to the top of the page

Fast ReplyReply to this topicStart new topic
Time is now: 11/21/08 12:37PM

Live VB.NET Help!

VB.NET Tutorials

Reference Sheets

VB.NET Snippets

Bye Bye Ads

Free DIC T-Shirt

T-Shirt Example

Related Sites

Monthly Drawing

Thumb Drive

Partners

Top Contributors

Top 10 Kudos This Month