
    The People of the State of New York, Respondent, v Robert Pike, Appellant.
    [714 NYS2d 720]
   Appeal by the defendant from a judgment of the Supreme Court, Queens County (Kron, J.), rendered April 3, 1998, convicting him of attempted criminal sale of a controlled substance in the third degree, upon his plea of guilty, and imposing sentence.

Ordered that the judgment is affirmed.

The defendant contends that he complied with the conditions of his plea agreement, and that the court therefore erred in imposing a sentence of imprisonment without affording him an opportunity to withdraw his guilty plea. However, since the defendant did not raise this claim at sentencing or seek to withdraw his plea, the issue is unpreserved for appellate review (see, People v Walters, 273 AD2d 418; People v Bratt, 261 AD2d 254; People v Gayle, 224 AD2d 710; People v Thompson, 193 AD2d 841). In any event, contrary to the defendant’s contention, the record demonstrates that he violated a key term of the plea agreement by failing to successfully complete a drug rehabilitation program. Accordingly, the court was no longer bound by its original promise to dismiss the indictment (see, People v Walters, supra; People v Bratt, supra; People v Gayle, supra; People v Munize, 251 AD2d 429).

Since the defendant was advised of the sentence he would receive if he failed to comply with the conditions of the plea agreement, his general waiver of his right to appeal encompasses his claim that the enhanced sentence imposed by the court was excessive (see, People v Monk, 270 AD2d 433; People v Miles, 268 AD2d 489). O’Brien, J. P., Sullivan, Krausman, Goldstein and Schmidt, JJ., concur.  