| 12
 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
 
 |  
            string chaine = ConfigurationManager.AppSettings["connectionString"];
            SqlConnection cnx = new SqlConnection(chaine);
            cnx.Open();
            SqlCommand cmd = new SqlCommand();
            cmd.Connection = cnx;
            //cmd.CommandText = "select * from PiecesNumerisees where NumeroInstance='C0002'" ;
            //SqlDataAdapter dr = new SqlDataAdapter("select * from PiecesNumerisees where NumeroInstance='C00002'", cnx);
            SqlDataAdapter dr = new SqlDataAdapter("select * from PiecesNumerisees  where FileID=1 or   FileID=3 ", cnx);
            SqlCommandBuilder MyCB = new SqlCommandBuilder(dr);
            DataSet ds = new DataSet("PiecesNumerisees");
            DataSet oDataSet = new DataSet("PiecesNumerisees");
            //dr.Fill(oDataSet, "PiecesNumerisees");
            dr.Fill(ds, "PiecesNumerisees");
            // Affichage du contenu de oDataSet avant insertion de données
            byte[][] scores = new byte[4][];
            DataRow myRow, myRow2;
            byte[] MyData = new byte[4];
            for (int i = 0; i < ds.Tables["PiecesNumerisees"].Rows.Count; i++)
            {
                int a = 0;
                // Response.Write(oDataSet.Tables["PiecesNumerisees"].Rows[i][2].ToString());
 
 
                myRow = ds.Tables["PiecesNumerisees"].Rows[i];
                //MyData = (byte[])myRow["fichier"];
                scores[i] = new byte[4];
                scores[i] = (byte[])myRow["fichier"]; 
 
 
 
            }
            for ( int i = 0; i < ds.Tables["PiecesNumerisees"].Rows.Count; i++)
            {
 
               Response.BinaryWrite(scores[i]);
                Response.Write(" <img src=EssaiBD.aspx />");
            } | 
Partager