Parcours d'un champ d'une table avec incrémentation d'un champ text
	
	
		Je veux savoir comment je parcours un champ d'une table jusqu'au dernier en langage vb.net ensuite j'incrémente la valeur du dernier champ et je le met dans un champ text dans une forms.
Voici ce que j'ai fait mais ca ne marche pas:(
	Code:
	
1 2 3 4 5 6 7 8 9 10 11 12 13 14
   |  
Private Sub Frmajoutf_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        'sql = "select Num_frs from Fournisseur"
        Dim cnx As New OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0; Data Source = C:\Documents and Settings\Administrateur.STANDARD\Mes documents\Projet Budget\Budget\Budget\Marches.mdb")
        Dim command As OleDbCommand = cnx.CreateCommand
        Dim myreader As OleDbDataReader
        Dim nbre As Integer
        command.CommandText = "select Num_frs from Fournisseur"
        cnx.Open()
        myreader = command.ExecuteReader
        nbre = myreader.FieldCount + 1
        Txtnumf.Text = nbre
        cnx.Close()
    End Sub |