Microsoft KB Archive/63834

= How to LINK PROISAMD.LIB to .EXE Even if SETUP &quot;ISAM in TSR&quot; =

Article ID: 63834

Article Last Modified on 10/23/2003

-

APPLIES TO


 * Microsoft BASIC Professional Development System 7.0
 * Microsoft BASIC Professional Development System 7.1

-



This article was previously published under Q63834



SUMMARY
The following technique gives you the setup configuration with the greatest flexibility of choice for ISAM support (as either a TSR [terminate-and-stay-resident] program or linkable .LIB) in compiled .EXE programs.

If you chose &quot;ISAM Routines in TSR&quot; (instead of &quot;ISAM Routines in LIB&quot;) when you ran SETUP.EXE, then to make a standalone .EXE program (that uses ISAM) that does not require the PROISAMD.EXE or PROISAM.EXE TSR program, you must LINK with the PROISAMD.OBJ and PROISAMD.LIB component libraries in the linker's object list. This technique requires that you choose to retain component libraries when you run SETUP.EXE.

This information applies to Microsoft Basic Professional Development System (PDS) versions 7.0 and 7.1 for MS-DOS and to Basic PDS version 7.1 for OS/2.



MORE INFORMATION
With Basic PDS 7.0, there are four SETUP.EXE options for installing ISAM support for compiled .EXE programs:
 * 1) ISAM Routines in TSR
 * 2) ISAM Routines in LIB, Support Database Creation and Access
 * 3) ISAM Routines in LIB, Support Database Access Only
 * 4) No ISAM support

Only option 1 creates PROISAM.EXE and PROISAMD.EXE TSR programs that can be used with Basic compiled .EXE programs. The TSR program created in option 1 can also be used in QBX.EXE. Option 1 is the default because it consumes the least disk space.

Options 2 and 3 create PROISAM.EXE and PROISAMD.EXE TSR programs that CANNOT be used in compiled .EXE programs and that can only be used by QBX.EXE and the ISAM utilities (ISAMIO.EXE, ISAMCVT.EXE, ISAMREPR.EXE, and ISAMPACK.EXE). If you choose Option 2 or 3 and you want ISAM support in your .EXE program, you must link to the ISAM .LIB files instead of using the TSR support for ISAM.

SETUP Option 4 does not copy any ISAM-related files onto your computer.

You may want to have the option of creating .EXE programs with full ISAM support provided either in the TSR program or linked from libraries. This can be accomplished by choosing Option 1 (&quot;ISAM Routines in TSR&quot;) and LINKing with PROISAMD.OBJ and PROISAMD.LIB in the object list, as follows: LINK /NOE ISAMPROG.OBJ+PROISAMD.OBJ+PROISAMD.LIB; The following are some important notes about the above LINK command line:
 * The NOExtended library search option (/NOE) is necessary to prevent &quot;Symbol Defined More than Once (L2025)&quot; errors.
 * Both object (PROISAMD.OBJ) and library (PROISAMD.LIB) files are required to LINK properly.
 * The PROISAMD.OBJ is normally deleted with component libraries by SETUP.EXE. You must choose to retain component libraries when you run SETUP.EXE to retain this necessary file.
 * PROISAMD.LIB must be specified in the object list instead of the library list on the LINK command line, as shown. (When LINKing a library in the object list, all object files contained in that library are LINKed into the EXE, as opposed to only the routines that are not otherwise resolved.)
 * ISAMPROG.BAS must be compiled with the BC /O (standalone) option. If you don't compile with BC /O, then the LINK error L2029 &quot;Unresolved external&quot; error will occur for 'b$IsamRtmUsed' and 'B$DOS3CHECK'.

The following code example would normally require the PROISAMD.EXE TSR program (when the &quot;ISAM Routines in TSR&quot; option is chosen during SETUP), but using the LINK line given below, the TSR program is not necessary. Compile and link the code example as follows: BC ISAMPROG /O; LINK /NOE ISAMPROG.OBJ+PROISAMD.OBJ+PROISAMD.LIB;

Code Example
' Name this source file as follows: ISAMPROG.BAS TYPE test x AS INTEGER END TYPE OPEN &quot;ISAMFILE&quot; FOR ISAM test &quot;table&quot; AS #1 CLOSE #1 END

Additional query words: BasicCom 7.00 7.10

Keywords: KB63834

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.