1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
   |  
 maRequete = " delete from [action] WHERE (([date]= @datee) and ([code_site]= @code_site)) "
        myCommand = New SqlCommand(maRequete, maConnexionSQLsrv)
        With myCommand.Parameters
            .Add(New SqlParameter("@datee", SqlDbType.DateTime, 8))
            .Add(New SqlParameter("@code_site", SqlDbType.BigInt, 8))
        End With
        With myCommand
            .Parameters("@datee").Value = Me.DropDownList2.SelectedValue
            .Parameters("@code_site").Value = code_site
        End With
        Try
            myCommand.Connection.Open()
            myCommand.ExecuteNonQuery()
            myCommand.Connection.Close()
 
 
        Catch ex As Exception
            Me.Label1.Text = "Ce rapport n'est pas enregistré"
 
        End Try | 
Partager