This blog describes the porting of a medium-sized application (~250 kloc) from D7 to Lazarus. It uses PostgreSQL as database, and the connection is being ported from DB Express (D7) to SqlDB (Lazarus).