So when the charges against you were read out in open court and the judge asked you if the facts as read were substantially true, you lied to the court and said yes?
As I said, my lawyer stipulated that the charges were true. I was never sworn in, nor did the judge ask me any questions directly.
Actually, it went kinda like this:
Charges were read (including the big one, driving without insurance). I had brought my proof of insurance (which pre-dated the charge) with me, just in case the judge did not accept the plea.
The prosecutor said "The defense and I have arrived at a plea deal. Defense will stipulate to a charge of driving over the limit, agree to pay a fine of $100 and court costs, and 6 months PBJ." (PBJ is shorthand in Maryland for "probation before judgement" - if you are not charged with any offenses during your probationary period, the record of the arrest and conviction are expunged and your driver's license is left with no points.)
The judge asked my lawyer "Is this correct to your understanding?"
My lawyer: "Yes, your honor."
Judge: "Done."
The judge then had his clerk enter it into the computer system.
I later found out what the problem was. The state's DMV had the wrong VIN listed for my vehicle, so when the insurance company reported it with the correct VIN, it never got onto my DMV record. When the cop called in my plate, the DMV computer had it listed as no insurance on record. In addition to the charge above, plus lawyer's fees, it also cost me a second registration fee, a towing and storage charge, plus a crap load of time getting it all straightened out. I was stopped for having a tail light out, which is the only thing I was guilty of, the cop piled a load of other charges on top when he found out I had "no insurance".