Et ca ne marche pas je ne sais vraiment pas prq pourtant quand j'execute la procédure tte seule ca marche, donc le blem vient de se boud de code !!!!
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10 SqlConnection con = GlobalVar._SQLConnection; SqlCommand com = new SqlCommand("ReAffectation", con); com.CommandType = CommandType.StoredProcedure; com.Parameters.Add(new SqlParameter("@Nom1", SqlDbType.Int)).Value = (int)extraitpar.SelectedValue; com.Parameters.Add(new SqlParameter("@Nom2", SqlDbType.Int)).Value = (int)reaffectea.SelectedValue; com.Parameters.Add(new SqlParameter("@user", SqlDbType.Int)).Value = GlobalVar.idUser; com.Parameters.Add(new SqlParameter("@computer", SqlDbType.VarChar,30)).Value = Environment.GetEnvironmentVariable("computername"); int val = com.ExecuteNonQuery();
Partager