تقييم الموضوع :
  • 0 أصوات - بمعدل 0
  • 1
  • 2
  • 3
  • 4
  • 5
أريد كود عرض نتائج البحث في تكست بوكس
#8
تفضل عزيزي

PHP كود :
Dim Con As New SqlConnection("Your Connection String")
 
       If Con.State ConnectionState.Closed Then Con.Open()
 
       Dim SqlStr As String "Select * from TableName Where ID=" ComboBox1.SelectedValue
        Dim Cmd 
As New SqlCommand(SqlStrCon)
 
       Dim DR As SqlDataReader
        DR 
Cmd.ExecuteReader
        If DR
.HasRows Then
            While DR
.Read
                TextBox1
.Text DR("FieldName")
 
               TextBox2.Text DR("FieldName")
 
               TextBox3.Text DR("FieldName")
 
               TextBox4.Text DR("FieldName")
 
           End While
 
       End If
 
       If Con.State ConnectionState.Open Then Con.Close() 
ضع الكود في حدث الـ SelectedIndexChanged للـ ComboBox
الرد }}}
تم الشكر بواسطة:


الردود في هذا الموضوع
RE: أريد كود عرض نتائج البحث في تكست بوكس - بواسطة Mr. DotNet - 10-11-15, 07:48 PM


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


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