14-09-19, 11:18 PM
(14-09-19, 10:55 PM)عبد العزيز البسكري كتب :السّلام عليكم و رحمة الله و بركاتهإضافة لما طرحه الأخ الغالي " ربيع " جزاه الله خير الجزاءيجب إستبدال عبارة Ace إلى Jetو الرقم 12 إلى 4بجملة الإتّصالتحياتيكود :
Imports System.Data.OleDb
Public Class Form1
Public con As New OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=|Datadirectory|\Database.mdb")
Dim dt As New DataTable
Dim da As New OleDbDataAdapter
Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
If TextBox1.Text = Nothing Then
MsgBox("UserName IS UN Courect", MsgBoxStyle.Information, "Info")
TextBox1.Focus()
Exit Sub
End If
If TextBox2.Text = Nothing Then
MsgBox("Password IS UN Courect", MsgBoxStyle.Information, "Info")
TextBox2.Focus()
Exit Sub
End If
dt.Clear()
da = New OleDbDataAdapter("select * from login where UserName= '" & TextBox1.Text & "' and Password = '" & TextBox2.Text & "'", con)
da.Fill(dt)
If dt.Rows.Count > 0 Then
Form2.Label1.Text = dt.Rows(0).Item("UserName")
Form2.Show()
Me.Close()
Else
MsgBox("UserName Or Password Is Un Courect")
End If
End Sub
End Class
شكرا لكم اخوانى الاعزاء لكم جزيل الشكر والحب
طلب اخير اخى اريد انا ازامن مثلا سيريال فى قاعدة الاكسيس مع البرنامج وشكرا جزيلا

![[صورة مرفقة: 149902872537641.jpg]](http://store4.up-00.com/2017-07/149902872537641.jpg)