Added SQLException.
First working example with custom HP.