Imports System.Data.OleDb
Public Class Form1
Private con As New OleDbConnection("Provider=Microsoft.ACE.OLEDB.12.0;Data Source=|DataDirectory|\TOPTOTAL.accdb;Jet OLEDB:Database Password=10442339")
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Using da As New OleDbDataAdapter("SELECT TOP 1 * FROM [parametres] ORDER BY [id_projet] DESC", con)
Dim dt As New DataTable
If da.Fill(dt) > 0 Then
Dim r As DataRow = dt.Rows(0)
TextBox1.Text = r(1)
TextBox2.Text = r(1)
TextBox3.Text = r(2)
TextBox4.Text = r(3)
TextBox5.Text = r(4)
TextBox6.Text = r(5)
TextBox7.Text = r(6)
TextBox8.Text = r(7)
TextBox9.Text = r(8)
TextBox10.Text = r(9)
TextBox11.Text = r(10)
TextBox12.Text = r(11)
TextBox13.Text = r(12)
TextBox14.Text = r(13)
TextBox15.Text = r(14)
TextBox16.Text = r(15)
TextBox17.Text = r(16)
TextBox18.Text = r(17)
TextBox19.Text = r(18)
End If
End Using
End Sub
End Class