السلام عليكم ور حمة الله وبركاتة
كيف الحال
مساء الخير
ياشباب انا سويت قاعدة بيانات وسويت اتصال مع قاعدة البيانات من نوع DISCONNECTED وجبت كل الطلبات اللازمه للاتصال
OLEDBCONNECTION
و
ADAPTER
و
DATA SET <======= بس هنا المشكله اذا حطيت الداتا سيت تطلع لي رساله شوف الصوره

===========================================================
قلت يمكن المشكله في نوع الاتصال وجربت الاتصال من نوع CONNECT يمكن تنجح معي
بس للاسف انا الاتصال رغم اني سويت كل شي وهذا هو الكود وصورة الكود انا كتبت لكم الكود كامل عشان محد يقول لي فيه خطاء في الكود
Public Class Form2
Inherits System.Windows.Forms.Form
#Region " Windows Form Designer generated code "
Public Sub New()
MyBase.New()
'This call is required by the Windows Form Designer.
InitializeComponent()
'Add any initialization after the InitializeComponent() call
End Sub
'Form overrides dispose to clean up the component list.
Protected Overloads Overrides Sub Dispose(ByVal disposing As Boolean)
If disposing Then
If Not (components Is Nothing) Then
components.Dispose()
End If
End If
MyBase.Dispose(disposing)
End Sub
'Required by the Windows Form Designer
Private components As System.ComponentModel.IContainer
'NOTE: The following procedure is required by the Windows Form Designer
'It can be modified using the Windows Form Designer.
'Do not modify it using the code editor.
Friend WithEvents ComboBox1 As System.Windows.Forms.ComboBox
Friend WithEvents TextBox1 As System.Windows.Forms.TextBox
Friend WithEvents TextBox2 As System.Windows.Forms.TextBox
Friend WithEvents TextBox3 As System.Windows.Forms.TextBox
Friend WithEvents TextBox4 As System.Windows.Forms.TextBox
<System.Diagnostics.DebuggerStepThrough()> Private Sub InitializeComponent()
Me.ComboBox1 = New System.Windows.Forms.ComboBox
Me.TextBox1 = New System.Windows.Forms.TextBox
Me.TextBox2 = New System.Windows.Forms.TextBox
Me.TextBox3 = New System.Windows.Forms.TextBox
Me.TextBox4 = New System.Windows.Forms.TextBox
Me.SuspendLayout()
'
'ComboBox1
'
Me.ComboBox1.Location = New System.Drawing.Point(80, 24)
Me.ComboBox1.Name = "ComboBox1"
Me.ComboBox1.Size = New System.Drawing.Size(121, 21)
Me.ComboBox1.TabIndex = 0
'
'TextBox1
'
Me.TextBox1.Location = New System.Drawing.Point(88, 56)
Me.TextBox1.Name = "TextBox1"
Me.TextBox1.TabIndex = 1
Me.TextBox1.Text = ""
'
'TextBox2
'
Me.TextBox2.Location = New System.Drawing.Point(88, 88)
Me.TextBox2.Name = "TextBox2"
Me.TextBox2.TabIndex = 2
Me.TextBox2.Text = ""
'
'TextBox3
'
Me.TextBox3.Location = New System.Drawing.Point(88, 120)
Me.TextBox3.Name = "TextBox3"
Me.TextBox3.TabIndex = 3
Me.TextBox3.Text = ""
'
'TextBox4
'
Me.TextBox4.Location = New System.Drawing.Point(88, 152)
Me.TextBox4.Name = "TextBox4"
Me.TextBox4.TabIndex = 4
Me.TextBox4.Text = ""
'
'Form2
'
Me.AutoScaleBaseSize = New System.Drawing.Size(5, 13)
Me.ClientSize = New System.Drawing.Size(292, 266)
Me.Controls.Add(Me.TextBox4)
Me.Controls.Add(Me.TextBox3)
Me.Controls.Add(Me.TextBox2)
Me.Controls.Add(Me.TextBox1)
Me.Controls.Add(Me.ComboBox1)
Me.Name = "Form2"
Me.Text = "Form2"
Me.ResumeLayout(False)
End Sub
#End Region
Dim conn As New OleDb.OleDbConnection
Dim comm As New OleDb.OleDbCommand
Dim dr As New OleDb.OleDbDataReader
Private Sub Form2_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
conn.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=D:\DaTa BaSeS\Library.mdb;Persist Security Info=False"
If conn.State = ConnectionState.Open Then
conn.Close()
End If
conn.Open()
comm.Connection = conn
comm.CommandText = "select * from studnet where stuno='" + ComboBox1.Text + "'"
Dr = comm.ExecuteReader
While Dr.Read
ComboBox1.Items.Add(Dr("stuno"))
End While
If Dr.Read Then
textbox1.text = Dr(1)
textbox2.text = Dr(2)
textbox3.text = Dr(3)
textbox4.text = Dr(4)
End If
Dr.Close()
comm.Dispose()
conn.Close()
End Sub
End Classهذا هو الكود بس شوف صورة الكود الان ومكان المشكله في التعريف

ياليت ياشباب تشوفون لي وش المشكله لاني والله ماخليت وسيله ماستخدمتها
وتقبلوا تحيتي
وفي انتظار مساعدتكم
وفمان الله