1 2 3 4 5 6 7 8 9 10 11 12 13 14
| file_stream.Read(tableau_images, 0, Convert.ToInt32(file_stream.Length));
if (cnx.connexion.State == ConnectionState.Closed)
{
cnx.connexion.Open();
//savedocument et une procedure stocké
SqlCommand com = new SqlCommand("SaveDocument", cnx.connexion);
com.CommandType = CommandType.StoredProcedure;
com.Parameters.Add("fournisseur", SqlDbType.VarChar).Value = fournisseur.Text;
com.Parameters.Add("documents", SqlDbType.Image).Value = tableau_images; // passer l'image recuperer par filestream
com.ExecuteNonQuery();
} |
Partager