0

I have a C++ .NET 2003 client application using Sybase 15 that is connecting to a Sybase 12.5 database server using ASEOLEDB. The client code builds the connection string and executes a stored procedure by calling the Microsoft library function CCommand::Open.

Most of the time, CCommand::Open returns S_OK and the code continues. However, seemingly randomly, that call will begin to return E_FAIL. The database, stored procedure, and input are all the same. This will last for 20-30 minutes, then seemingly resolve itself and start working again.

When the issue occurs, I can use Toad for Sybase to execute the stored procedure with the same input without issue. I can also use an older build of the client application that uses Sybase 11 that also has no issue. I can also run a script in PowerShell with the same Sybase 15 connection string that also executes successfully.

I suspect some sort of connection pooling difference between the Sybase 11 and Sybase 15 client code to be the issue, but I don't know how to prove it/disprove it/isolate the cause further.

Possible related question: Intermittent Oledb connection error “Cannot open database ''.”

Community
  • 1
  • 1
Gary Stevens
  • 51
  • 2
  • 9

1 Answers1

0

I found the issue was with the Sybase OLE DB driver we were using (sybdrvoledb.dll version 15.0.0.356). When I would replace the Sybase/DataAccess/OLEDB/dll folder with the dll folder from a Sybase 15.7 version the issue would not occur. I used DLL files from Sybase 15.7.0.80 and 15.7.0.1000 and both would fix the issue.

Gary Stevens
  • 51
  • 2
  • 9