Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.
Announcements
FPGA community forums and blogs on community.intel.com are migrating to the new Altera Community and are read-only. For urgent support needs during this transition, please visit the FPGA Design Resources page or contact an Altera Authorized Distributor.

Fortran with MySQL?

h-faber
Beginner
2,388 Views
Hi,
does a possibility exist to connect a Fortran program with a MySQL database? If so, how??

Any hints welcome.
0 Kudos
11 Replies
dan789
Beginner
2,388 Views
0 Kudos
h-faber
Beginner
2,388 Views
Hi Dan,
of course I found f90sql already, but I can see only support for DVF, CVF and MS SQL listed. Therefore I was unsure whether it also runs with IVF 8.1 and MySQL 4.x.
Do you know more?
0 Kudos
Steven_L_Intel1
Employee
2,388 Views
Canaimasoft has been saying they were working on a port of f90SQL for IVF for a long time, but they have not responded to my inquiries the last two times I contacted them. I wish I knew what was going on there...

If you look around in this forum, people have found ways to call the CVF version of the library without much trouble.
0 Kudos
h-faber
Beginner
2,388 Views

sblionel wrote:
If you look around in this forum, people have found ways to call the CVF version of the library without much trouble.




I know, but does this information include that it also works with IVF 8.1? And MySQL 4.x?
0 Kudos
Steven_L_Intel1
Employee
2,388 Views
What I was trying to say was that people had found ways of using the CVF version of the library from IVF. f90SQL uses the ODBC interface, so it should work with the latest MySQL (as well as Oracle, Access, etc.)

I will try to contact Canaimasoft one more time. I'm uncertain if we (Intel) can provide appropriate jackets for this, but there's nothing I know of to stop a user from doing so...
0 Kudos
Intel_C_Intel
Employee
2,389 Views
Well, it's distributed by Lahey now......
0 Kudos
Steven_L_Intel1
Employee
2,389 Views
Lahey distributes the Lahey version, that's all.
0 Kudos
greldak
Beginner
2,389 Views
Steve
all versions - CVF, Lahey, Salford are included on the CD distributed by Lahey - at least in the UK.
I'm not exactly impressed with Canaimasoft's support though - couldn't get any response from them until I also put it to Lahey's support who forwarded it to them.
0 Kudos
Steven_L_Intel1
Employee
2,389 Views
Thanks for the clarification. Lahey does distribute it, but it is not exclusive to them - at least that's what Canaimasoft's Nick Vogel told me once upon a time.

Canaimasoft is a pretty small operation, and the principal developer lives off on a Pacific island somewhere, I think. I'm not sure his heart is into it anymore. Too bad.
0 Kudos
onkelhotte
New Contributor II
2,389 Views
The discussion forum on Canaimasofts website seems to be dead too, I posted a few questions and got no response. But 14 views in 3 weeks, thats quite a lot ;-)
I emailed Mr. Garcia, who seemed to be a programmer from Canaimasoft (he posted a few timed in this forum too) but I didnt get an answer from him.
So I would say that there is no more support from Canaimasoft. Too bad, our company just bought f90sql and we are "a little bit" disappointed about this.
0 Kudos
edmund_dunlop
Beginner
2,389 Views
f90SQL is designed to operate with any DataBase software that can be accessed through ODBC. So you will need Windows ODBC drivers for MySQL - see the URL http://dev.mysql.com/downloads/connector/odbc/3.51.html to get an appropriate download. You must install these and then follow the instructions in the f90SQL documentation to connect with your database.
Regarding the use of f90SQL with IVF, here are some notes I made really for myself. I hope they may be of help or of some interest to you.
========================================
========================================

Two relevant posts on the forum for the Intel Fortran Compiler for Windows (if you want to build on the DVF/CVF Version of f90SQL):

========================================
(1)
JugoslavDujic
Member Since: 04-22-2002
Posted: 10-19-2004 04:44 AM ID#: 11235
You need DFORRT.dll from CVF, because F90SQL is linked to dll version of it. It's available for download within the CVF redistributable kit VFRUN66BI.exe:
Jugoslav
========================================
(2)
sblionel
Member Since: 03-12-2002
Posted: 11-17-2004 06:34 AM ID#: 11542
This is what will get you CVF calling semantics:
!DEC$ ATTRIBUTES STDCALL,REFERENCE,DECORATE,MIXED_STR_LEN_ARG,ALIAS:"FOO" :: FOO
where FOO is the routine name. MIXED_STR_LEN_ARG isn't documented but it works. You need the DECORATE and ALIAS because STDCALL will default to downcasing the name.
Steve
========================================
My own approach:
I have modified the Lahey LF95 version of f90SQL to make it work with IVF. I use the Lahey versions of f90SQL.lib to compile and I redistribute f90SQLLF95.dll with my f90SQL applications.
The LF95 dll contains the necessary run-time routines. Thus you don't need to redistribute yet another dll (equivalent to DFORRT.dll).
This is what will get you Lahey LF95 calling semantics:
!DEC$ ATTRIBUTES C,REFERENCE,ALIAS:"_routinename_" :: RoutineName
e.g.
!DEC$ ATTRIBUTES C,REFERENCE,ALIAS:"_f90sqlstrformatul_" :: f90SQLStrFormatUL
or
!DEC$ ATTRIBUTES C,REFERENCE,ALIAS:"_sizeoff90sql_table_priv_struct_" :: SizeOff90SQL_TABLE_PRIV_STRUCT
Note that the first "_routinename_" is lower case within leading/trailing quotes and underscores; the second RoutineName preserves the mixed case of the actual name used in the program and stands alone.
f90SQL.f90 must be edited accordingly.
========================================
A suitable batch file for IVF to compile the .mod files (f90SQL.f90 etc.) could be:
@echo off
echo This batch file to re-compiles f90SQL modules
echo Use this batch only if your compiler is producing
echo error messages indicating that it is not able to
ech o recognize the format of f90SQL modules.
pause
echo on
ifort -c -align:sequence -Qip f90SQLConstants.f90
ifort -c -align:sequence -Qip f90SQLStructures.f90
ifort -c -align:sequence -Qip f90SQL.f90
Note the use of the -align:sequence option. This will eliminate diagnostics and improve memory layout for certain variables.
========================================
========================================
Edmund.
0 Kudos
Reply