How to Make an MS-DOS Level SQL Server Connection

Last reviewed: December 2, 1996
Article ID: Q112482
The information in this article applies to:
  • Microsoft FoxPro for MS-DOS, versions 2.5x, 2.6x

SUMMARY

The procedure below shows how to use the Connectivity Kit to connect to a SYBASE or Microsoft SQL Server from within FoxPro for MS-DOS.

MORE INFORMATION

NOTE: The FPSQL.PLB file supports only SQL Server connections. The file DBNMPIPE.EXE must be loaded before FoxPro for MS-DOS is started. the DBNMPIPE.EXE file is not supplied in the Connectivity Kit; it is provided with the SQL Server software.

To connect to a SQL Server machine, do the following:

  1. Boot the machine and load the workstation software.
2. Load DBNMPIPE.EXE at the MS-DOS prompt. 3. Start FoxPro for MS-DOS. 4. Type the following lines in the Command window:

      SET LIBRARY TO SYS(2004)+"FPSQL" ADDITIVE
      handle=DBConnect("your_SQL_Server_name","sa","password","pubs")

Handle will return a positive number if you have a proper connection. "Your_SQL_Server_name" can be called anything. Check with your SQL administrator to find out its exact name. For more information, see page 5 of the FoxPro Connectivity Kit "User s Guide."


Additional reference words: FoxDos 2.50 2.50a 2.50b 2.60 2.60a ODBC CK
KBCategory: kbinterop kbprg
KBSubcategory:


THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Last reviewed: December 2, 1996
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.