Click here to Skip to main content
15,902,114 members
Home / Discussions / Database
   

Database

 
GeneralRe: Stored Procedure or Trigger for Autogenerate Colunm Pin
rrrriiizz2-Jul-08 21:34
rrrriiizz2-Jul-08 21:34 
GeneralRe: Stored Procedure or Trigger for Autogenerate Colunm Pin
rrrriiizz3-Jul-08 1:09
rrrriiizz3-Jul-08 1:09 
GeneralRe: Stored Procedure or Trigger for Autogenerate Colunm Pin
Mycroft Holmes4-Jul-08 0:26
professionalMycroft Holmes4-Jul-08 0:26 
GeneralRe: Stored Procedure or Trigger for Autogenerate Colunm Pin
rrrriiizz5-Jul-08 1:35
rrrriiizz5-Jul-08 1:35 
QuestionTrigger with Time Pin
obarahmeh2-Jul-08 20:08
obarahmeh2-Jul-08 20:08 
AnswerRe: Trigger with Time Pin
Mycroft Holmes2-Jul-08 21:00
professionalMycroft Holmes2-Jul-08 21:00 
GeneralRe: Trigger with Time Pin
obarahmeh2-Jul-08 22:50
obarahmeh2-Jul-08 22:50 
QuestionsqlDataReader Execution in a Function Pin
IlseBrase2-Jul-08 18:29
IlseBrase2-Jul-08 18:29 
Hi, I'm still a beginner in this. Creating code in vb to log in a user. The username and password typed into the textbox must be verified against the username and password in the database. I use a SqldataReader to perform this action but can't seem to get the syntax correct... please can you help me.


Here is the Function and the relevant button :

Protected Sub butLogin_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles butLogin.Click
If CheckPassword(txtusername.Text, txtpassword.Text) Then
'FormsAuthentication.RedirectFromLoginPage(txtusername.Text, True)
Response.Redirect("Default.aspx")
Else
MsgBox("username or password not found. try again")
End If
End Sub

Private Function CheckPassword(ByVal username As String, ByVal password As String) As Boolean
Dim bsuccess As Boolean
Dim command As New SqlCommand("SELECT (Username,Password) from UserInfo WHERE Username = '" & txtusername.Text & "'", connection)
Try
Dim drdUsers As SqlDataReader
drdUsers = command.ExecuteReader
connection.Open()
While drdUsers.Read
If txtpassword.Text = drdUsers.Item("Password") Then bsuccess = True
End While
connection.Close()
Catch
bsuccess = False
connection.Close()
End Try
Return bsuccess

End Function
Sigh | :sigh:
AnswerRe: sqlDataReader Execution in a Function Pin
Vimalsoft(Pty) Ltd3-Jul-08 4:03
professionalVimalsoft(Pty) Ltd3-Jul-08 4:03 
QuestionSQL image data Pin
nelsonpaixao2-Jul-08 14:02
nelsonpaixao2-Jul-08 14:02 
AnswerRe: SQL image data Pin
Giorgi Dalakishvili2-Jul-08 21:58
mentorGiorgi Dalakishvili2-Jul-08 21:58 
AnswerRe: SQL image data Pin
Hesham Amin2-Jul-08 22:08
Hesham Amin2-Jul-08 22:08 
QuestionConnection-string [modified] Pin
nelsonpaixao2-Jul-08 13:59
nelsonpaixao2-Jul-08 13:59 
AnswerRe: Connection-string Pin
rrrriiizz2-Jul-08 19:31
rrrriiizz2-Jul-08 19:31 
GeneralRe: Connection-string Pin
Mycroft Holmes2-Jul-08 21:12
professionalMycroft Holmes2-Jul-08 21:12 
QuestionOracle instant client Pin
Muammar©2-Jul-08 1:00
Muammar©2-Jul-08 1:00 
QuestionFinaly I Found it. Compare and synchronize SQL Server database structures and data. Pin
dingoishere2-Jul-08 0:12
dingoishere2-Jul-08 0:12 
AnswerRe: Finaly I Found it. Compare and synchronize SQL Server database structures and data. Pin
Syed Mehroz Alam2-Jul-08 18:44
Syed Mehroz Alam2-Jul-08 18:44 
QuestionPerformance Issue Pin
sujithkumarsl1-Jul-08 19:43
sujithkumarsl1-Jul-08 19:43 
AnswerRe: Performance Issue Pin
Paul Conrad1-Jul-08 20:03
professionalPaul Conrad1-Jul-08 20:03 
GeneralRe: Performance Issue Pin
sujithkumarsl1-Jul-08 20:24
sujithkumarsl1-Jul-08 20:24 
AnswerRe: Performance Issue Pin
N a v a n e e t h1-Jul-08 20:36
N a v a n e e t h1-Jul-08 20:36 
GeneralRe: Performance Issue Pin
sujithkumarsl1-Jul-08 22:04
sujithkumarsl1-Jul-08 22:04 
GeneralRe: Performance Issue Pin
N a v a n e e t h1-Jul-08 22:51
N a v a n e e t h1-Jul-08 22:51 
GeneralRe: Performance Issue Pin
sujithkumarsl1-Jul-08 23:12
sujithkumarsl1-Jul-08 23:12 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.