تقييم الموضوع :
  • 0 أصوات - بمعدل 0
  • 1
  • 2
  • 3
  • 4
  • 5
[سؤال] مشكلة ال Reader
#21
هــــــل يـــوجـــــد حـــــــــل ؟؟؟
الرد }}}
تم الشكر بواسطة: الضمير المستتر
#22
ارفقي مثال للمطلوب وراح نساعدك .
الرد }}}
تم الشكر بواسطة: الضمير المستتر
#23
المشروع في المرفقات 


والفورم هو :  dailyreporteditdelete


الملفات المرفقة
.rar   نـظـام إدارة الـتـقـاريـر.rar (الحجم : 248.36 ك ب / التحميلات : 33)
الرد }}}
تم الشكر بواسطة: الضمير المستتر
#24
(23-11-15, 08:38 AM)mona626 كتب : المشروع في المرفقات 


والفورم هو :  dailyreporteditdelete

اوكي جربي الكود هذا ،،، استبدلي الكود كامل واعطيني خبر

كود :
Dim cmd As New SqlCommand("SELECT * FROM MonitoringReports WHERE EmployeeID = '" & TextBox9.Text & "' and LicensesNumber='" & TextBox1.Text & "'", con)
       Dim dr As SqlDataReader = cmd.ExecuteReader

       con.Open()

       If dr.Read = True Then
           TextBox8.Text = dr!EmployeeName
           TextBox9.Text = dr!EmployeeID
           DateTimePicker2.Value = dr!DateOfEntry
           TextBox1.Text = dr!LicensesNumber
           TextBox2.Text = dr!LicensesName
           TextBox5.Text = dr!LicensesType
           ComboBox6.Text = dr!LicensesCase
           ComboBox1.Text = dr!Location
           ComboBox2.Text = dr!Street
           TextBox3.Text = dr!NearOrNextTo
           ComboBox3.SelectedValue = dr!ActionType
           ComboBox7.SelectedValue = dr!ActionNumber
           ComboBox5.SelectedValue = dr!FineOrWarrningType
           TextBox4.Text = dr!Notes
           DateTimePicker1.Value = dr!DateOfFollow
       Else
           MsgBox("السجل غير موجود")
       End If

       dr.Close()
       cmd.Dispose()
       con.Close()
الرد }}}
تم الشكر بواسطة: الضمير المستتر



التنقل السريع :


يقوم بقرائة الموضوع: بالاضافة الى ( 1 ) ضيف كريم