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

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




Authenticate username and password using VB 2008 and Oracle database

 
Reply to this topicStart new topic

Authenticate username and password using VB 2008 and Oracle database

sniperterulung
13 Oct, 2008 - 08:01 PM
Post #1

New D.I.C Head
*

Joined: 17 Apr, 2006
Posts: 4


My Contributions
Hi everyone...
I'm developing the system.. But I don't know how create and code the authentication login screen using oracle database .
Right now, I'm using Visual Basic 2008 to develop windows form, Database - Oracle 10g.
Some one can help me how to create and code it from start.

I tried to surf in the internet, mostly the examples using Microsoft Access and Ms Sql Server.

I don't know where i can find the examples using Oracle as the database.

Thanks for help me..


User is offlineProfile CardPM
+Quote Post

gbertoli3
RE: Authenticate Username And Password Using VB 2008 And Oracle Database
13 Oct, 2008 - 08:06 PM
Post #2

DIC at Heart + Code
Group Icon

Joined: 23 Jun, 2008
Posts: 1,046



Thanked: 17 times
Dream Kudos: 950
My Contributions
Try googling it
User is offlineProfile CardPM
+Quote Post

sniperterulung
RE: Authenticate Username And Password Using VB 2008 And Oracle Database
19 Nov, 2008 - 08:53 PM
Post #3

New D.I.C Head
*

Joined: 17 Apr, 2006
Posts: 4


My Contributions
Hi.. everybody..

Someone can help me..
I tried to create login authenticate using vb 2008.. based on oracle databse .After running it, I get message "wrong username and password "The code as below.. Thanks a lot..
CODE


Private Sub OK_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles OK.Click
        Dim conn As New OracleConnection
        conn.ConnectionString = _
        "Data Source=oracle;User Id=REPOS_OWNER;Password=password;"
        conn.Open()
        Dim parmuser As New OracleParameter
        parmuser.OracleDbType = OracleDbType.Char
        parmuser.Value = TxtUsername.Text
        Dim parmpass As New OracleParameter
        parmpass.OracleDbType = OracleDbType.Char
        parmpass.Value = TxtPassword.Text

        Dim cmd As New OracleCommand
        cmd.Connection = conn
        cmd = New OracleCommand("select login_id,password from s_pengguna where login_id ='" & TxtUsername.Text & "' and password ='" & TxtPassword.Text & "'", conn)
        cmd.CommandType = CommandType.Text

        Dim dr As OracleDataReader

        dr = cmd.ExecuteReader()
        If dr.Read() Then

            TxtUsername.Text = dr("login_id")
            TxtPassword.Text = dr("password")
            MsgBox("Access Allowed")

            Dialog1.Show()

            
      
            'ElseIf TxtUsername.Text = dr("login_id") Then
            '  MsgBox("Wrong Username")

            ' ElseIf TxtPassword.Text = dr("password") Then

            ' MsgBox("Wrong Password")

        Else

            MsgBox("Wrong Username and password")

          

        End If
        
    End Sub



This post has been edited by sniperterulung: 19 Nov, 2008 - 09:11 PM
User is offlineProfile CardPM
+Quote Post

Fast ReplyReply to this topicStart new topic
Time is now: 12/2/08 04:42AM

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