maskboyz
unread,Dec 10, 2013, 4:19:25 AM12/10/13You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to
Imports System.Data.OleDb
Public Class Form1
Dim con As New OleDbConnection
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
con.ConnectionString = "Provider=Microsoft.ACE.OLEDB.4.0;Data Source=C:\Users\Pinkmask-Boyz MK\Documents\LogIn.accdb"
End Sub
Public Function ask()
Dim dt As New DataTable
Dim ds As DataSet
help me with this code :(
// ds.Tables.Add(dt)
// con.Open()
// Dim da As New OleDbDataAdapter("SELECT * FROM User", con)
// da.Fill(dt)
For Each DataRow In dt.Rows
If txtusername.Text = DataRow.item(1) And txtpassword.Text = DataRow.item(2) Then
con.Close()
Return True
End If
Next
con.Close()
Return False
End Function
Private Sub btnlogin_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnlogin.Click
If ask() = True Then
MsgBox("loogin")
Else
MsgBox("wrong")
End If
End Sub
End Class