'CHECKING Username and password Public Function validuser(Username As String, password As String) Dim db As String Dim Cmd As String Dim sql As String Dim Cn As ADODB.Connection Dim rs As ADODB.Recordset db = App.Path & "\NFL.MDB" Cmd = "Provider=Microsoft.Jet.OLEDB.4.0;" & _ "Data Source=" & db & "" Set Cn = New ADODB.Connection With Cn .ConnectionString = Cmd .Open End With Set rs = New ADODB.Recordset sql = "Select * From [Security] where Username LIKE '" & Username & "' and Password LIKE '" & password & "'" rs.Open sql, Cn, adOpenForwardOnly, adLockReadOnly If Not rs.EOF Then validuser = True Else validuser = False End If rs.Close Set rs = Nothing Cn.Close Set Cn = Nothing End Function
Microsoft ActiveX Data Objects Library x.x
App.Path
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)