With ForDBC the Fortran programmer can read and write tables of any database for which an ODBC driver is supplied. And this is the case with most databases of manufactures such as Oracle, Microsoft, IBM, Sybase. And this is also true for spreadsheets as they are created with Excel oder Lotus. They are equipped with an ODBC driver (ODBC=Open Database Connectivity Standard). Under Windows an ODBC interface is ready to be used. However the ODBC functions are not easy to access by a Fortran programmer because the documentation and the tools supplied by Microsoft are designed for C/C++ or VB programmers. ForDBC offers help. The Fortran interface provided by ForDBC is almost complete with respect to the ODBC v3.5 specification. This means that with ForDBC you can call all of these ODBC functions as if they were programmed in Fortran. Furthermore hundredths of ODBC and SQL specific constants are supplied. Simply include in your Fortran program the source line
and you are ready to use the ODBC functions and constants as you find them documented in the Windows ODBC API. This documentation either comes with your compiler (e.g., Compaq Visual Fortran, or Intel Visual Fortran, or Microsoft Visual Studio) or it can be found in the Microsoft Windows Platform Software Development Kit (SDK) which is supplied with most software development tools offered by Microsoft. Or you find it on Microsoft's Developer WebSite. Because getting started with ODBC can be tedious, ForDBC is equipped with several example programs (completely in Fortran) which show you how to use ODBC. They demonstrate how to read from or write to tables of a Microsoft Access database or an Excel spreadsheet. ForDBC comes with a short documentation
which provides you with the essential information that you need for a
quick start into ODBC programming. Users of Compaq Visual Fortran and Intel Visual Fortran
are supplied with a complete workspace (.dsw) and solution (.sln), respectively,
which contains several sample projects which show how to access a database
in several ways. Prices & Licensing ForDBC comes completely with source code. We deliver the licence and software by e-mail. You can use it in your programs and distribute these without any royalty payments or runtime fees.
All prices are specified in EUROs and are without German tax (VAT). To order, simply send a purchase order by email or fax (+49(0)30/92900872). Payment is possible by credit card (VISA and Mastercard/Eurocard are accepted) or by money transfer to our account.
Example ForDBC provides you a few simple data base - an MS/Excel sheet (ODBCTest.xls) and an MS/Access database (test-db.mdb). The MS/Access database contains a table named "Tabelle1". Its structure and contents: This table contains 4 columns named "ID", "I4",
"DP" and "STR". This example shall demonstrate how
to use the common Fortran variable types INTEGER, REAL. DOUBLE PRECISION
and CHARACTER.
((SQL = Structured Query Language). If you want to execute this command in a Fortran program, then you can do so calling an ODBC function which is made availabe via ForDBC:
This executes the SELECT command, but it does not deliver the table's contents. To get this in a Fortran program, the values in the table's rows have to be transferrred into corresponding Fortran variables. We declare these Fortran variables (here in Fortran 77 notation)
whose names are simply identical with those of the table's columns. These Fortran variables are bound to column specifications in the SQL command by calling the ODBC function SQLBindCol or SQLBindParameter, respectively. For example:
binds the first parameter ("id") of the SELECT command to the Fortran variable "Id" (INTEGER*2). If then the ODBC function
is executed, the Fortran variable "Id" will hold the value which is found in the current row of the column labeled "id" in table "tabelle1". Internally SQLFetch uses a row cursor which is incremented each time SQLFetch is executed. This means, to get the whole result set of the SELECT command, SQLFetch is to be called repeatedly. A complete example program which demonstrates how the SELECT command above is porgrammed in Fortran can be found here.
Support, Training etc. If you have questions regarding ForDBC, we would be happy to assist you. We also offer ForDBC trainings or develop ODBC based software, if you prefer to have the database access being programmed in Fortran externally.
|
|
||||||||||||||||||||||||||
|
Delivery, Licensing, Requirements |
|||||||||||||||||||||||||||
|
|||||||||||||||||||||||||||
|
Copyright QT software GmbH 2008. All rights of the owners of those registered names listed in this document are accepted without any restriction. Excel and Windows are registered trademarks of the Microsoft Corporation, U.S.A.. Notes regarding liability and copyrights, trademarks used on this page. |
|||||||||||||||||||||||||||