Hello,
I've the following code to search a record in the database:
Now I want to compare the field "Password" from the Table "Utilizadores" with the value of the "PasswordTextBox" field of a form.
How can I refer to the field?
Thanks,
João Pinto
I've the following code to search a record in the database:
Code:
Public Class LoginForm1
Dim da As OleDb.OleDbDataAdapter
Dim ds As New DataSet
Dim con As New OleDb.OleDbConnection
Dim sSQL As String
Private Sub OK_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles OK.Click
con.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;" & "Data Source=""C:\Programaçao\Visual Basic\Inapal\ReportIt\ReportIt.mdb"";"
con.Open()
sSQL = "SELECT * FROM [Utilizadores] WHERE (User= '" & ComboBox1.Text & "')"
da = New OleDb.OleDbDataAdapter(sSQL, con)
ds.Clear()
da.Fill(ds, "Utilizadores")
Now I want to compare the field "Password" from the Table "Utilizadores" with the value of the "PasswordTextBox" field of a form.
How can I refer to the field?
Thanks,
João Pinto