If a connection to the secondary ASE server is established, the ASE OLE DB Driver returns “E_FAIL” for the function return HRESULT.
To confirm a successful failover, do one of the following:
Examine the dwMinor field in ERRORINFO (returned from IErrorRecords::GetBasicErrorInfo), or the description returned from IErrorInfo::GetDescription. The dwMinor value should be “30130” for a successful HA failover.
Examine the description from IErrorInfo::GetDescription. The description should be as follows, where ASEServerName is the server name failed over to:
“Sybase server is not available or has terminated your connection, you have successfully connected to the next available HA server ASEServerName. All transactions has been rolled back.”
Sybase recommends that you check the code returned by
dwMinor to determine the success of the failover rather than by
examining the error description.
Then the client must then reapply the failed transaction with the new connection. If failover happens while a transaction is open, only the changes that were committed to the database before failover are retained.