Is in Fortran possible to connect to a database (e.g. MySQL)?
I want to develop a Fortran calculation application. This application should be able to connect with a MySQL database. The next steps are:
read data from a table by SQL queries,
Execute calculations
Result of these calculations should be stored in the database
Thanks in advance for your help
3 Likes
Welcome @eric.bakker to the Discourse!
Yes, in @Arjen Markus’ book Modern Fortran in Practice , the chapter 6 is “Interfacing to C: SQLite as an example”:
http://fortranwiki.org/fortran/show/Modern+Fortran+in+Practice
The Fortran code can be found here:
http://flibs.sourceforge.net/examples_modern_fortran.html
5 Likes
Arjen
May 24, 2021, 11:26am
3
Actually, my Flibs project at http://flibs.sourceforge.net contains a module (by Daniel Kraft) for connecting with MySQL directly. It is not as extensive as the SQLite one, but it ought to be useful as a beginning.
2 Likes