2 Replies - 12646 Views - Last Post: 19 November 2008 - 09:53 PM Rate Topic: -----

#1 sniperterulung  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 4
  • Joined: 17-April 06

Authenticate username and password using VB 2008 and Oracle database

Post icon  Posted 13 October 2008 - 09:01 PM

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..

Is This A Good Question/Topic? 0
  • +

Replies To: Authenticate username and password using VB 2008 and Oracle database

#2 gbertoli3  Icon User is offline

  • DIC at Heart + Code
  • member icon

Reputation: 40
  • View blog
  • Posts: 1,162
  • Joined: 23-June 08

Re: Authenticate username and password using VB 2008 and Oracle database

Posted 13 October 2008 - 09:06 PM

Try googling it
Was This Post Helpful? 0
  • +
  • -

#3 sniperterulung  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 4
  • Joined: 17-April 06

Re: Authenticate username and password using VB 2008 and Oracle database

Posted 19 November 2008 - 09:53 PM

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..
 

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 November 2008 - 10:11 PM

Was This Post Helpful? 0
  • +
  • -

Page 1 of 1