This manual uses the following typographic conventions.
| Format | Use |
| WIN.INI | Uppercase letters indicate file names, SQL statements, macro names, and terms used at the operating-system command level. |
| SQLRETURNCODE f90SQLFetch(hdbc, iRet) |
Sans serif font is used for sample command lines and program code. |
| argument | Italicized words indicate information that the user or the application must provide, or word emphasis. |
| SQLEndTran | Bold type indicates that syntax must be typed exactly as shown, including function names. |
| [ ] | Brackets indicate optional items; if in bold text, brackets must be included in the syntax. |
| | | A vertical bar separates two mutually exclusive choices in a syntax line. |
| {} | Braces delimit a set of mutually exclusive choices in a syntax line; if in bold text, braces must be included in the syntax. |
| & | Is the line continuation indicator in Fortran 90. It indicates that a Fortran statement continues in the next line. |
| Ptr | The suffix Ptr is used to indicate that the argument to a subroutine is an address to a memory location (usually the address to a variable) |
| ... | An ellipsis indicates that arguments can be repeated several times |
| . . . |
A column of three dots indicates continuation of previous lines of code |
In its original definition, all ODBC API procedures are functions. In the Fortran programming tradition, functions do not modify their arguments. Because of this, f90SQL implements all ODBC functions as subroutines. However, throughout the manual, I will frequently use the term function to refer to ODBC API's procedures. Unless explicitly specified, the reader should assume that when calling ODBC from f90SQL all functions are, indeed, Fortran subroutines.
Because the syntax of some f90SQL subroutine calls may be complicated, the following example illustrates how one of the most complex syntaxes should be interpreted. This is the syntax definition for the subroutine f90SQLBindParameter:
| f90SQLBindParameter | (StatementHandle,
ParameterNumber, InputOutputType, ValueType, ParameterType, ColumnSize, DecimalDigits, {ParameterValue, | ParameterValuePtr, BufferLength,} StrLen_or_IndPtr, iRet) |
The word in boldface indicates that the subroutine must be called with exactly that name (i.e. f90SQLBindParameter). The other words are in italics, so they represent arguments that must be passed to the subroutine. Note that we have used the symbol & to indicate line continuation. The symbol is not part of the syntax itself; it is just used to indicate that the next line is part of the syntax to the subroutine. Note the expression {ParameterValue, | ParameterValuePtr, BufferLength,}. What this expression is telling you is that you must pass either argument ParameterValue, or the pair of arguments ParameterValuePtr, BufferLength, but not both. That is, you can call the subroutine as:
| call f90SQLBindParameter | (StatementHandle,
ParameterNumber, InputOutputType, ValueType, ParameterType, ColumnSize, DecimalDigits, ParameterValue, StrLen_or_IndPtr, iRet) |
or as
| call f90SQLBindParameter | (StatementHandle,
ParameterNumber, InputOutputType, ValueType, ParameterType, ColumnSize, DecimalDigits, ParameterValuePtr, BufferLength, StrLen_or_IndPtr,iRet) |
Finally, note that two of the arguments (ParameterValuePtr and StrLen_or_IndPtr) represent pointers to memory, rather than variables. What this means is that instead of passing the variable as an argument, you must pass a pointer to that variable. In Fortran this is usually achieved by using the function loc(var). As an example, the first form of subroutine f90SQLBindParameter would be called as:
| call f90SQLBindParameter | (StmtHndl, Col,
SQL_PARAM_INPUT, SQL_F_CHAR, SQL_CHAR, 20, 0, MyString, loc(MyStrLen), iRet) |