How to Trouble-Shoot Sybase Server Connections in FoxPro

ID: Q128557

2.60 2.60a WINDOWS kbinterop kbtshoot

The information in this article applies to:

SUMMARY

On occasion, you may have difficulty in connecting to a Sybase server. The information in this article should help you troubleshoot connection problems when attaching to a Sybase server.

MORE INFORMATION

The Sybase Server database product is one of several back-end server data sources that FoxPro can connect to via ODBC. Microsoft does not include a driver specific to Sybase in the Connectivity Kit. Sybase drivers can be obtained from either Sybase or 3rd party ODBC driver vendors. The Microsoft SQL Server ODBC driver included in the Connectivity Kit was certified for connecting to 4.9.2 or earlier Sybase SQL Servers. This driver will not connect to Sybase System/10 servers, however, and the newer ODBC SQL Server drivers from Microsoft (starting with version 2.00.1912) are not certified to connect to any Sybase SQL Server versions.

If you attempt to connect to a pre-System/10 Sybase server with the older Microsoft drivers, you may get a -2 error return code, which indicates an environment-level error. Using DEBTOR() to find the specific error message may yield something like this:

   3-1 ODBC error 08001 (-1) [microsoft ODBC sql server driver] unable
   to connect to data source

Or you may get this version of the message:

   IM002 - Datasource not found - No default driver specified.

The most common error that occurs when connecting to a Sybase server is caused by the fact that the INSTCAT.SQL file has not been run. INSTCAT.SQL is a configuration file distributed with the FoxPro ODBC installation disk. This program must be run against versions of SQL Server or Sybase that are earlier than 4.2a.

NOTE: If INSTCAT.SQL is transferred from one location to another, it should not be sent using FTP with binary mode. It must be transported using text mode. When INSTCAT is run, if it comes back within a few seconds, INSTCAT has not run successfully; however, there will be no indication of this. You still will not be able to connect. Instead, when INSTCAT runs, it will take approximately one to two minutes. When it has completed, you should attempt to connect again. INSTCAT.SQL will NOT run successfully if the master database is full. If this is the case, the master database will need to be rebuilt to provide the necessary room for INSTCAT.

If these steps do not solve the problem, try the following:

If you are using CKSAMPLE.APP to log on and it isn't working or it errors out, then try to log on directly by setting the library to FPSQL and issuing a manual DBCONNECT. For more information on how to do this, please see page 5 of the FoxPro Connectivity Kit manual.

This information should resolve the majority of problems when connecting to a Sybase server. If none of these solutions work, please contact Microsoft Product Support for further assistance.

Additional reference words: FoxWin 2.60a ODBC SYBASE SQL SERVER TSHOOT KBCategory: kbinterop KBSubcategory: FxinteropOdbc

Keywords          : FxinteropOdbc 
Version           : 2.60 2.60a
Platform          : WINDOWS

Last Reviewed: May 1, 1996