1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40
| Imports System
Imports System.Data
Public Class modiPerso
Dim db_informatique As New informatique_connection
Private Sub modiPerso_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Try
Dim rech As String
Dim i As Integer
i = 1
rech = InputBox("Entrer le matricule", "Recherche")
TextBox1.Text = rech
db_informatique.myreq = "SELECT * FROM Perso WHere Matricule = '" & rech & "'"
db_informatique.connecting_in_informatique()
Do While db_informatique.rdr.Read
Me.a1.Text = db_informatique.rdr(0).ToString
Me.a2.Text = db_informatique.rdr(1).ToString
Me.a3.Text = db_informatique.rdr(2).ToString
Me.a4.Text = db_informatique.rdr(3).ToString
Me.a5.Text = db_informatique.rdr(4).ToString
Me.a6.Text = db_informatique.rdr(5).ToString
Me.a7.Text = db_informatique.rdr(6).ToString
Me.a8.Text = db_informatique.rdr(7).ToString
Me.a9.Text = db_informatique.rdr(8).ToString
Me.a12.Text = db_informatique.rdr(9).ToString
Me.a10.Text = db_informatique.rdr(10).ToString
Me.a11.Text = db_informatique.rdr(11).ToString
Me.a13.Text = db_informatique.rdr(12).ToString
Me.a14.Text = db_informatique.rdr(13).ToString
Me.a15.Text = db_informatique.rdr(14).ToString
i = 2
Loop
db_informatique.disconnecting_in_informatique()
Catch ex As OleDb.OleDbException
MessageBox.Show(ex.Message.ToString)
End Try
End Sub |