Using the Connectivity Kit to Connect to Paradox Database

Last reviewed: June 27, 1995
Article ID: Q116078
The information in this article applies to:
  • Microsoft FoxPro for Windows, versions 2.5, 2.5a, 2.5b, 2.6
  • Microsoft FoxPro Connectivity Kit, versions 2.5, 2.6

SUMMARY

This article describes how to use the FoxPro Connectivity Kit and ODBC to access data that resides in a Paradox database.

NOTE: Paradox is manufactured by a vendor independent of Microsoft; we make no warranty, implied or otherwise, regarding this product's performance or reliability.

MORE INFORMATION

This article assumes that you have the Paradox ODBC driver that is available as a part of the Microsoft ODBC Desktop Database Driver Kit (DDDK). This driver is also included with some Microsoft products, such as Microsoft Word for Windows and Microsoft Excel for Windows.

To connect to a Paradox data source, you must install the Paradox ODBC Driver and set up a Paradox data source through the ODBC Paradox Setup dialog box in the Windows Control Panel. Since this is a level 1 ODBC driver, the data source is a directory name or the current directory, as indicated in the Setup dialog box.

NOTE: The currently shipping Paradox ODBC driver supports only Paradox 4.0. The Paradox driver that ships with the ODBC 2.0 SDK provides an option in the Setup dialog box to specify Paradox 3.0 - 4.0 or Paradox 5.

The following is a code sample that "connects" to a Paradox data source:

   *-- Connect to a Paradox Data Source
   PRIVATE lcSource, lcUser, lcPwd, hDBHdle, lnDBRes

   *-- Init memvars
   STORE 0 TO hDBHdle, lnDBRes
   lcSource = "Paradox_sdk20"  && Paradox Data Source Name from ODBC Dialog
   lcUser = ""                 && Not needed for single tier drivers
   lcPwd = ""                  && Not needed for Paradox

   *-- Load Library if not already
   IF !"FPSQL" $ SET('library')
        SET LIBRARY TO FPSQL.FLL
   ENDIF
   WAIT WINDOW "Attempting connection ..." NOWAIT
   hDBHdle = dbConnect(lcSource, lcUser, lcPwd, "")
   IF hDBHdle > 0
      WAIT WINDOW ;
    "Connected to Paradox -  Handle:"+STR(hDBHdle,1,0) TIMEOUT 2
   ELSE
      WAIT WINDOW ;
    "Unable to connect to Paradox .."
   ENDIF

REFERENCES

Microsoft ODBC Desktop Database Driver Kit Paradox Driver online Help file


Additional reference words: FoxWin 2.50 2.50a 2.50b 2.60 ck
KBCategory: kb3rdparty kbtool kbprg kbcode
KBSubcategory: FxtoolCk


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: June 27, 1995
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.