Maybe is not a very used feature but in our team we think also that is a quite handy feature.

As @Dmitry Maslennikov wrote, we are using it mostly to shorten long multi-level package names, but it is also useful for grouping classes that do different tasks (e.g. classes with tables and others with stored procedures) from different packages into a single SQL package.

 

Hi,

In .Net, using the managed provider (https://cedocs.intersystems.com/latest/csp/docbook/DocBook.UI.Page.cls?KEY=GBMP) the connection object has the property ServerZV, that returns the $ZV:

        static void Main(string[] args)
        {
            InterSystems.Data.CacheClient.CacheConnection cacheConn = new InterSystems.Data.CacheClient.CacheConnection();
            cacheConn.ConnectionString = "Server=localhost;Port=1972; Namespace=USER; Password=xxxx; User ID=xxxx";
            cacheConn.Open();

            Console.WriteLine(cacheConn.ServerZV);
            Console.ReadLine();

            cacheConn.Close();
            cacheConn.Dispose();

         }

The direct access to globals from .net is quite interesting but, as of right now, it has a major drawback: the Connect() method only allows the access to the cache database that is on the same machine.

If the server has at the same time the application and the database is fine. But otherwise, as usually the application server is different as the database server, you cannot use it.

We have checked the documentation and we haven’t found a way to connect to a database in another server using Caché eXTreme. There is any way to do it?