I am trying to make a login form, and i need it to check for the inputed name in the database. I can't figure how to get text from the cell. i would also prefer not to use a GDV on the form. I am mainly seeking a way to do it with SQL statements and vb.net code.
here is what i have atm...
Imports System.Data Public Class login Sub UpdateGrid(ByVal sqlStr As String) Dim dt As New DataTable() Dim connStr As String = "Provider=Microsoft.Jet.OLEDB.4.0;" & _ "Data Source=logindb.MDB" Dim dataAdapter As New OleDb.OleDbDataAdapter(sqlStr, connStr) dataAdapter.Fill(dt) dataAdapter.Dispose() dgvDisplay.DataSource = dt End Sub Private Sub login_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Dim check As String UpdateGrid("Select username From logintbl") check = dgvDisplay.Rows(1).Cells(1). End Sub End Class
it isn't much, but i just can't start this until i figure out how to check names.
thanks in advance.