| | |
urgent help for Vb.net Login page using sql statement
Please support our VB.NET advertiser: Intel Parallel Studio Home
![]() |
•
•
Join Date: Nov 2006
Posts: 11
Reputation:
Solved Threads: 0
i have made a simple login page with 2 textboxes for username and password and a button to login.
the usernames and passwords are in an sql database . how would i go about retrieving the username and password from the database.
i have tried a select where statement
If TxtUsername.Text = "" And TxtPassword.Text = "" Then
MessageBox.Show("Please enter username and password")
ElseIf TxtUsername.Text = "" Then
MessageBox.Show("Please enter username")
ElseIf TxtPassword.Text = "" Then
MessageBox.Show("Please enter Password")
ElseIf SqlDataAdapter1.SelectCommand.CommandText "SELECT * FROM Managers WHERE managerID = '+ TxtUsername.Text +' and password = '+ txtPassword.text+ " Then
FrmManView.Show() .
but this does not appear to do anything, what am i doing wrong? i am a beginner so any help will be appreciated thanks
the usernames and passwords are in an sql database . how would i go about retrieving the username and password from the database.
i have tried a select where statement
If TxtUsername.Text = "" And TxtPassword.Text = "" Then
MessageBox.Show("Please enter username and password")
ElseIf TxtUsername.Text = "" Then
MessageBox.Show("Please enter username")
ElseIf TxtPassword.Text = "" Then
MessageBox.Show("Please enter Password")
ElseIf SqlDataAdapter1.SelectCommand.CommandText "SELECT * FROM Managers WHERE managerID = '+ TxtUsername.Text +' and password = '+ txtPassword.text+ " Then
FrmManView.Show() .
but this does not appear to do anything, what am i doing wrong? i am a beginner so any help will be appreciated thanks
•
•
•
•
ElseIf SqlDataAdapter1.SelectCommand.CommandText "SELECT * FROM Managers WHERE managerID = '+ TxtUsername.Text +' and password = '+ txtPassword.text+ " Then
FrmManView.Show()
Never tried = Never Know
So, Please do something before post your thread.
* PM Asking will be ignored *
So, Please do something before post your thread.
* PM Asking will be ignored *
![]() |
Similar Threads
Other Threads in the VB.NET Forum
- Previous Thread: HTML with VB.NET need help urgent
- Next Thread: How can I update my access database via VB.net using this code
| Thread Tools | Search this Thread |
.net .net2008 2008 access add advanced application array basic beginner browser button buttons center click code combo cpu cuesent data database datagrid datagridview date datetimepicker designer dissertation dissertations dissertationtopic employees excel exists fade filter forms generatetags html images input intel internet listview map mobile module monitor msaccess mysql net number objects open pan panel pdf picturebox picturebox2 port position print printing printpreview problem regex reuse right-to-left save search searchvb.net serial settings shutdown socket sqldatbase sqlserver storedprocedure survey temperature textbox timer timespan transparency txttoxmlconverter user usercontol vb vb.net vba vbnet vista visual visualbasic visualbasic.net visualstudio.net web winforms wpf wrapingcode xml year






