[Lazarus] How to connect to MariaDB/mySql database from fpc/Lazarus?

Graeme Geldenhuys mailinglists at geldenhuys.co.uk
Fri Sep 13 19:10:04 CEST 2019


On 26/08/2019 8:53 pm, Bo Berglund via lazarus wrote:
> I am confused about the SQLDB component tab in the IDE since it lists
> many connection components for MySql (7 in fact). Which one do I use?

If you want to hide all complexity of database components, maybe take a
look at tiOPF. It abstracts away all database components and allows you
to freely switch between backend databases and database components
simply with a compiler define change and recompile. You can even switch
from a client/server application to a n-tier application - again just
with a compiler define changes and recompile. Not a single line of code
needs to change. As a bonus, your application works 100% with objects
instead of database tables and fields - thus making unit testing so much
easier.

tiOPF homepage:  http://tiopf.sourceforge.net
tiOPF help on FPC wiki:  https://wiki.lazarus.freepascal.org/tiOPF

Regards,
  Graeme

-- 
fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal
http://fpgui.sourceforge.net/

My public PGP key:  http://tinyurl.com/graeme-pgp


More information about the lazarus mailing list