#Caché

30 Followers · 4.5K Posts

  

InterSystems Caché is a multi-model DBMS and application server. See more details here.

Documentation.

Question Anne Kantola · Aug 31, 2018

Hi,

we have Angular solution and Cache server. We need to have separate users and sessions on same browser (laptop, table etc) for every user and for one user with many connections.

Thought this was resolved, but unfortunately not.

-----------------------------------------------------------------------------------------------------------------------

I got the code away from here, because it was some how ok.

The session on server mixed, but no any more, thanks our folk and local engineer's tools :)

1
0 604
Article Rustam Ibragimov · Sep 4, 2018 4m read

Have you ever thought why the code that you write in Caché Object Script is exported to an XML file?


The news is that it’s time to change. Starting from the release of Atelier, a new development environment, and Caché 2016.2, you will be able to export and import files in the format that you use in the studio, into the so-called UDL (Universal Definition Language) format. You can now write code that is not only fast but also looks beautiful in the exported form. However, we get another equally serious issue: if all new projects are in the UDL format, what will happen to backward compatibility?

1
0 1349
Question Eduard Lebedyuk · Aug 28, 2018

Let's say I have a list structure:

set list = $lb("stri,ng", $c(0), 2)

I want to replace all $c(0) elements with empty elements, so my list would look like:

set list = $lb("stri,ng", , 2)

What's the fastest way to do that?

13
0 708
Question Eduard Lebedyuk · Aug 29, 2018

I have a list

set list=$lb(1,$c(0),2)

How do I replace $c(0) with an empty element?

My list should look like this:

set list=$lb(1,,2)

I tried using $list but it either replaces the element with an empty string:

set $list(list,2)=""
zw list

Resulting in:

list=$lb(1,"",2)

Or removes the element altogether:

set $list(list,2,2)=""
zw list

Resulting in:

list=$lb(1,2)
2
0 458
Discussion Francis Galiegue · Apr 4, 2016

Hello community!

At the global summit in Phoenix, we (Lite Solutions) will be presenting a tool performing static code analysis on ObjectScript source files. You can see it in action at this URL:

https://demo.cachequality.com

Technically, the tool is a language plugin over SonarQube (http://sonarqube.org) and consists of three main parts:

  • parsing the language,
  • collecting metrics,
  • collecting issues.

The third point is where we kindly request for feedback.

6
1 2164
Question MARK PONGONIS · Aug 27, 2018

Is there a way to lock at the record level? I know that you can lock at the table level:

&sql(UNLOCK mytest IN EXCLUSIVE MODE)

but am unable to find a way to lock just at the record/row level. 

Would this also affect a SELECT statement done on the record?

1
0 457
Question Eduard Lebedyuk · Aug 27, 2018

I want to call java method and return $lb structure from it.

JDBC jar seems to contain relevant class -  com.intersys.jdbc.CacheListBuilder, but so far I only managed to return a string that looks like a list.

Here's my java code:

package isc.poi;

import com.intersys.jdbc.CacheListBuilder;
import java.sql.SQLException;

public class Test {

    public static String Test() throws SQLException
    {
        CacheListBuilder list = new CacheListBuilder("UTF8");
        list.set(123);
        list.set(456);
        list.set("\"abc\"");

        return list.toString();
    }
}
3
0 413
Question Mack Altman · May 26, 2016

Does anyone have any experience with getting, unfortunately, an older version of Cache to authenticate via SMTP to send email? I have verified that the settings are set up properly on the mailbox as I have successfully sent an email from a LAMP server, which comes from the same IP address.

If you have any thoughts, I would greatly appreciate it.

This is the error I receive

ERROR #6034: SMTP server connection failed during MAIL FROM command: <READ>zSend+105^%Net.SMTP.1.

when I run the following.

6
0 2738
Question Token Ibragimov · Aug 14, 2018

Hello,

while sending JSON request :

Set Object = ##class(%ZEN.proxyObject).%New()
Set Object.iin="123132132"
Set Object.firstName=name
Set Object.lastName=surname
Set Object.middleName=middlename
Set Object.birthDate=birthDate
Set Object.contractType="Z001"

set sc = ##class(%ZEN.Auxiliary.jsonProvider).%ObjectToJSON(Object)

Set sc = ##class(%ZEN.Auxiliary.jsonProvider).%WriteJSONStreamFromObject(httpRequest.EntityBody, Object)

Set sc = httpRequest.Post("", 2)

receive error bellow:

"Corrupt body: json: cannot unmarshal number into Go struct field CheckContractRequest.iin of type string". 

18
0 1678
Question Jack Huser · Aug 22, 2018

Hello Everyone,

I was wondering about the best way to initialize several variables, or several lists of variables.

Would it be better to write it like:

set (var1, var2, var3) = "value1"
set (var4, var5) = "value2"
set (var6,var7,var8) = "value3"

or

set var1="value1", var2="value1", var3="value1", var4="value2", var5="value2", var6="value3", var7="value3", var8="value3"

or

set var1 = "value1"
set var2 = "value1"
set var3 = "value1"
set var4 = "value2"
set var5 = "value2"
set var6 = "value3"
set var7 = "value3"
set var8 = "value3"

When comparing the speed of each methods:

6
0 613
Question Seth Jaffe · Aug 15, 2018

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.1.1.111.0

The code:

7
0 1087
Question Virginia Rogers · Jul 31, 2018

I have the following class definitions:

Class PET.RadioTracer Extends %Persistent
{
Property TracerName As %String;
}
Class PET.Injection Extends %SerialObject
{
Property RadioTracer As RadioTracer;
}
Class PET.ImageStudy Extends %Persistent
{
Property Injection As array Of Injection;
}
Class PET.ImageFile Extends %Persistent
{
Relationship Study As PET.ImageStudy [ Cardinality = parent, Inverse = ImageFiles ];
Property InjKey As %String;
}
6
0 1404
Question Jacob Hall · Aug 17, 2018

I'm Trying to create a "Windowing Function" In Cache similar to SQL Server. I'm trying to create a Row Number for every account number (Example Below). I know I can use the %Vid function to create the Row Number but I need the row number to reset with every new account number. In SQL Server it would be Row_Number over (Partition by account number order by account number). and Example of what I am trying to create is below.

Row Number          Account Number

1                                             1

2                                             1

1
0 888
Question Sebastian Thiele · Aug 2, 2018

Hi,

we are moving an existing ZEN-Application to a new version of Caché (2017.2.2). It is a rather old application and we need to do some modifications due to the thightend security of ZEN in this and prior release (we came from 2013.1). One of the changes required is to alter a table Name of a ZEN-Table on the server-side. Anyway this gives us a problem, since we receive an error

ERROR #5001: Client modification of protected property ( tableName) disallowed for security reasons.
SOURCELEMENT: %ZEN.Component.tablePane (tpSimilarity)

The tableName change is triggered from a js method

2
0 501
Question Ali Chaib · Aug 2, 2018

Hi,

I'm trying to execute a function in a  loop using studio but I'm having an error; "ODBC driver for sql server Invalid precision value"

Any help please?

Example :

for i=1:1:2{

...

SET expression1 = "exec [po_dm].[dbo].[UP_ED_TE_IT] @P__TE_IT_ID = ?, @P__TE_ID = ?, @P__TE_RA_ID = ? ,@P__TE_VAL = ?, @P__LOW_REF = ?, @P__HIGH_REF = ?, @P__LOW_CRI= ?, @P__HIGH_CRI=? "  

set pars(1) = -1
set pars(2) ="A"
set pars(3)= "A"
set pars(4)="B"
set pars(5)="C"
set pars(6)="D"
set pars(7)="E"

set pars(8)="F"


set pars = 8
set status = ..Adapter.ExecuteUpdateParmArray(.tRe, expression1,.pars)

}

1
0 599
Question Joao Palma · Aug 13, 2018

Hi

I need to query my messages and filter by a XML node.  

In the message viewer it would be Critetion Type = 'VDoc Property Path' and class = 'Enslib.Edi.XML.Document'.

At the moment my query looks like this

SELECT *

FROM EnsLib_EDI_XML.Document

where doctype = 'avc:mydoctype'

I need then to look for 'HeadNode:SubNodeValue'

Anyone who could help me out with this?

Thank you

5
0 768
Announcement Mike Kadow · Jul 9, 2018

I have finished my 4th book about Caché and MUMPS. This will probably be my last.

I am deeply grateful and humbled for all the help I have received from this group and the WW Response Center.

You all have something very special going here. 

Unlike most groups like this, you help those who are struggling to get started, that is unique.

Never lose the attitude of graciously helping the beginner. 

=================================================================================

Following is the book cover, available on Amazon or Smile.Amazon,

1
0 1505
Question David.Satorres6134 · Aug 7, 2018

Hi,

I'm trying to find the faster way to get the data from a class, and I find it very slow compared to traditional globals. So, I hope some of you can bring some light to me :-)

I have thousands of registers in a class, and to access it quickly I'm going with $o at the index. From there, I get the values using $listget(). Something like that:


    s FromDateH = (+$h-1)
    for {
        set id=$order(^TestI("StartDateIDX",FromDateH,id))
        quit:id=""
        set dat=$lg(^TestD(id))    //dat=$lb("a","b","c","d","e")
    }
    
10
0 675