TSQLConnection is part of fpc, not lazarus. So rebuilding Lazarus won't help.
But I have no idea what you are trying to do. If you want to execute some code at some event, just assign an event-handler to that event. That's where events are for. You don't have to inherit anything?