Error when connecting to Sybase with dbExpress/BDP

Abstract: Error when connecting to Sybase with dbExpress/BDP

Product: Borland Developer Studio 2006

Problem Description

I am trying to connect to Sybase ASE 15 using the dbExpress and the supplied Sybase Open Client. When I try to connect, I receive the error "Connection Open Failed". Similarly when I try via BDP, I receive the error message, "Object reference not set to an instance of an object."


Problem Resolution

Most likely the Sybase Open Client dll's required by dbExpress cannot be found. dbExpress's Sybase driver is dependent on the files, libct.dll and libcs.dll. The latest Sybase client has changed the names of its client dll's and so those files will not be present by default. There is a batch file supplied with the Sybase client that can rename the files for those applications that need the older file names, however. Run

<sybase client install>\OCS-15_0\scripts\copylibs.bat create

Then ensure that the directory containing libct.dll is present on the path. By default, this is

<sybase client install>\OCS-15_0\dll