Seth Jaffe · Aug 15, 2018

Failure to create CacheObjectConnection.

We are running old VB code on a Windows 2012 R2 server.

In the last month the following error has been happening.

      Failure to create CacheObjectConnection.
      Failure in GetClassInfo for CacheObjectConnection

      Factory not connected to server
     Send to Cache' failed

Neither the the code or Cache instance has not changed.

Cache 2017.

The code:

        Dim bRtn As Boolean
        Dim objCacheObject As Object
        cntr = 1

        Dim factory = New CacheObject.Factory
            bRtn = factory.Connect(ConnStr)
            objCacheObject = factory.Static("CacheObjectConnection")
        Catch ex As Exception
            LogPrint("Cache Exception: " & ex.Message, "GetReportInformation")

        End Try

         Dim S2 As String  = objCacheObject.CallCache("GET^GUISTACK(""" & CC & """,""" & Pointer & """,""" & cntr & """)")

Error on line factory.Static("CacheObjectConnection")  

connection string: cn_iptcp:[1972]:PHDEMO:PHSYSADM:"plain text strin"

Project references: Interop.CacheObject

0 7 424 2


Can you still connect with Studio on the same machine ?

Apparently, the factory.Connect is failing, what is the value of ConnStr ?

You could change the line by 

ConnStr = factory.ConnectDlg()

which will display a dialog with options to login, or give you an error if it cannot reach Caché.

added line ConnStr = factory.ConnectDlg() after Try.  First get a msg "Unable to Connect to cn_iptcp:[1972]". click cancel and get the Connection Manager.  Entered the username and password. This gives a message "You should select a namespace". There is no namespace listed.

Do you have a user with the %ALL Role to check if the problem is user-based, 

if that user cannot login either, it could be that some services are disabled.

Again, you can know for sure by enabling auditing and look at the login failures.

Tried using Studio but get an access denied msg. I'll check with my systems guy

If Caché Auditing is enabled, you can check the login failure messages to see if  the problem is a disabled user or wrong username/password.

(Auditing can be enabled in Caché portal ->  system admin -> Security -> Auditing -> Enable Auditing.

Use 'configure Auditing events' to enable Login Failure messages.

We can log into the Database with an ODBC Connection.

I also tried the CacheActiveX dll, but same issue as CacheObject.

Tried using Cache Object Binding from  .NET and when connecting I got error: Invalid Message Count (452); expected 3 got: 891494482. Connection Closed.