Some good ideas, but some caveats as well
Tip for configuring - applies to mySQL so I assume it does to others:
Assumptions are the mother of all... never mind.
1. Stick with keeping the dll in the program directory (just keeps things simpler)
This will bite you when trying to connect in design-time... as has been amply demonstrated in earlier posts on this thread.
Myself, I just copy my dll to the windows system directory on my dev machine and forget about it... except that you need to remember to put the dll in the program directory when giving the compiled program to other people.
2. Ensure you have the correct release version of the dll eg mysql5.0 or mySql5.5 or whatevr db you use etc
that matches a) your program and b)your server and c) to the os you are compiling to
This advice is invalid for MySQL as well: re b): your mysql *CLIENT* dll version should match the unit name in your FPC code. The client version can differ from the server version (though it's up to mysql to indicate what's supported).
For MS SQL Server/Sybase ASE with FreeTDS dlls, it's recommended to use a fairly recent dll, e.g. the one provided as a courtesy on the FPC server (see links elsewhere). That single DLL should work for MS SQL 2000..2008 and probably 2012 (and probably really old versions) and Sybase ASE at least 12.5..15.
3. BIG tip - If compiling 32bit ensure you use the 32bit dll or 64bit dll when compiling with 64bit lazarus
Yes, that completely applies to FreeTDS dlls as well (in fact, AFAIU any dlls on Windows should match bitness with the program that calls them)
Thanks,
BigChimp