Disgraced entertainer Bill Cosby had an appeal that was holding up his case tossed on Monday, meaning the case will advance toward trial. 

Cosby had appealed Montgomery County Judge Steven T. O'Neill's ruling that no "nonprosecution agreement" between Cosby's lawyers and former Montgomery County DA Bruce Castor protected Cosby from prosecution for the alleged sexual assault of former Temple University employee Andrea Constand.

The Superior Court dismissed that claim, the Inquirer reported, just as O'Neill did, after finding no legal record of Castor's alleged agreement with Cosby's former lawyer Wally Phillips, now deceased.

"We are gratified that the court came to the same conclusion," said Montgomery County DA Kevin Steele in a statement. "We can now hold a preliminary hearing. We are ready for that hearing and look forward to the court setting a date so we can present our case."

RELATED: What we learned at Bill Cosby's first major hearing 

Constand was allegedly involved in a nonconsensual sexual encounter with Cosby in his Elkins Park mansion in 2004. She reported it to police a year later, but then-DA Castor did not prosecute Cosby.

Current Montco DA Kevin Steele charged Cosby with involuntary sexual assault in December, just days before the statute of limitations ran out.

Cosby's case can now move forward toward a preliminary hearing.

RELATED: Tiny town bore brunt of Cosby media circus