- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I have an application that utilises the f90SQL functions once supported by Canaimasoft and this works well for 32-bit applications however unfortunately there is no 64-bit library f90SQL.lib currently available. Having looked at the procedures within f90SQL, most seem to be directly related to the Microsoft ODBC functions. I'm assuming that I need to modify the handle KINDs from integers to int_ptr_kind() in the F90Constants module and call the C MSDN routines via a FORTRAN wrapper layer. I thought I might be able to generate the function interfaces using the Module Wizard but this did not work.
Does anyone have any advice or tips for me to generate the interfaces by hand. I only use about 15 functions so it should not be a huge task once I've established a method.
Current assumptions:
1) Change all handle KINDs in SQLConstants.f90 from 4 to int_ptr_kind()
2) Create a wrapper layer in FORTRAN using interfaces to ODBC functions using ISO_BINDING features.
3) Recompile f90SQLConstants, f90Structures and F90SQLmodules
4) Build SQL Wrappers
5) Add odbc32.lib to project (Is there a 64-bit library that is required instead?)
6) Link and test.
Thanks in advance.
Does anyone have any advice or tips for me to generate the interfaces by hand. I only use about 15 functions so it should not be a huge task once I've established a method.
Current assumptions:
1) Change all handle KINDs in SQLConstants.f90 from 4 to int_ptr_kind()
2) Create a wrapper layer in FORTRAN using interfaces to ODBC functions using ISO_BINDING features.
3) Recompile f90SQLConstants, f90Structures and F90SQLmodules
4) Build SQL Wrappers
5) Add odbc32.lib to project (Is there a 64-bit library that is required instead?)
6) Link and test.
Thanks in advance.
Link Copied
4 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Have a look at the ODBC wrapper in my Flibs project - http://flibs.sf.net.
Recently there was another thread relating to this subject. Maybe the solution thatthread'sOP chose
is suitable for you as well.
Regards,
Arjen
Recently there was another thread relating to this subject. Maybe the solution thatthread'sOP chose
is suitable for you as well.
Regards,
Arjen
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I think you'll have to give up on f90SQL - it has its own library that would need to be rebuilt for 64-bits, and the source is not available.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Yes Steve entirely I agree with your advice regarding giving up on f90sql, what I am proposing to do is utilise F90SQL's constants and procedures files to write my own (cut-down) version to suit my needs. It is my understanding that the library that has no source available is simply a wrapper that bridges the fortran and native ODBC function calls. The ODBC functions and f90SQL procedures appear have a one-to-one relationship. So the missing part of the jigsaw isthe calling of theODBC API functions. This wrapper would deal with function parameter conversions (character strings etc.) and naming conventions. I suppose my original questions can be broken down into the following:
1) Are my above assumptions correct?
2) How easy is it to call native ODBC functions from FORTRAN?
3) Can this be done without the need of a wrapper written in C.
I will take a look at the ODBC wrapper kindlymentioned in Arjen's post and see if I can get any ideas from that.
Thanks
1) Are my above assumptions correct?
2) How easy is it to call native ODBC functions from FORTRAN?
3) Can this be done without the need of a wrapper written in C.
I will take a look at the ODBC wrapper kindlymentioned in Arjen's post and see if I can get any ideas from that.
Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I know people have called ODBC functions using the Module Wizard to construct wrappers, but I don't have any examples at hand.

Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page