Probleme affichage dans un textbox

igoussam Messages postés 1 Date d'inscription mardi 13 juin 2017 Statut Membre Dernière intervention 17 juin 2017 - Modifié le 13 juin 2017 à 18:56
Whismeril Messages postés 19026 Date d'inscription mardi 11 mars 2003 Statut Contributeur Dernière intervention 20 avril 2024 - 13 juin 2017 à 17:07
Bonjour les amis j'ai un problème d'affichage dans un textbox apartir d'une requête SQL
voici mon code :
  cn.Open();
            SQLiteCommand cmd = new SQLiteCommand();
            cmd.Connection = cn;
            cmd.CommandText = " select conge.nombre_jour from contient,conge,ferier where contient.id_jours=ferier.id_jours  and contient.id_conge=conge.id_conge and ferier.datejours not between conge.date_debut and conge.date_fin order by conge.id_conge desc limit 1 ";
            SQLiteDataReader dr = cmd.ExecuteReader();
            while (dr.Read())
            {
                textBox3.Text += string.Format("{0}\t\t{1}", dr.GetString(0)) + Environment.NewLine;
            }
        
            dr.Close();
            cn.Close();


EDIT : Ajout des balises de code (la coloration syntaxique).
Explications disponibles ici : ICI

Merci d'y penser dans tes prochains messages.

1 réponse

Whismeril Messages postés 19026 Date d'inscription mardi 11 mars 2003 Statut Contributeur Dernière intervention 20 avril 2024 656
13 juin 2017 à 17:07
Bonjour

Il manque un argument à ton string.format.
0
Rejoignez-nous