ADVANCE LOGIN USING ADODB & MS ACCESS first of all goto reference - TopicsExpress



          

ADVANCE LOGIN USING ADODB & MS ACCESS first of all goto reference and look for : Microsoft ActiveX data objects 2.8 library CODE IN A MODULE: Option Explicit Public conn As ADODB.Connection Public Sub connect() Set conn = New ADODB.Connection conn.Open Provider=Microsoft.Jet.OLEDB.4.0;Data Source= & App.Path & \myDatabase.mdb;Persist Security Info=False End Sub Sub main() connect frmLogin.Show End Sub Code in a form This code is intended for my students in Datamex feel free to edit, modify and copy the code with a purpose for more info visit code-vb6.blogspot your VB 6.0 tutorial guide or email paulanthonysolis@gmail Private Sub cmdCancel_Click() End End Sub Private Sub cmdOK_Click() Dim rs As New ADODB.Recordset rs.Open SELECT * FROM tblUser WHERE username = & txtUserName & , conn, adOpenStatic, adLockReadOnly If rs.RecordCount 0 Then If txtPassword = rs!password Then MsgBox Username and Password Succesful! Remove msgbox above then call a form to be load if login is succesful! Else MsgBox Invalid Password, try again!, , Login End If Else MsgBox Invalid Login, try again!, , Login End If rs.Close Set rs = Nothing End Sub Private Sub Form_Load() End Sub for more vb6 programs visit me and mr. Herman Nazareth https://facebook/rannie.halog.gc https://facebook/Dev7Cyber2012
Posted on: Sat, 25 Jan 2014 07:33:24 +0000

Trending Topics



Recently Viewed Topics




© 2015