#Caché

30 Followers · 4.5K Posts

  

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

Documentation.

Question Svetlana Ilina · Nov 28, 2016

Hello. I am a student from Syktyvakar Forest Institute(Russia). 

I need to make Research : "Databases for working with spatial data
Consider MySQL, PostgreSQL and 1 to choose from". I want to explore Cache with subject library of spatial data.

Help.

Does Someone from the developers write the libraries of spatial data?

3
0 470
Article Maks Atygaev · Dec 11, 2016 4m read

Caché offers a number of methods for going through a collection and doing something with its elements. The easiest method uses a while-loop and lets you fulfill the task in an imperative manner. The developer needs to take care of the iterator, jumping to the next element and checking if the loop is within the collection.


 But is it really what a developer should be concerned with?! A developer should be working on solving the problem at hand – quickly and producing code of the highest quality. It would be great to be able to just take a collection and apply a function to it that will perform t


18
1 1909
Question Marek Bernád · Jul 3, 2017

Good day, I have this issue. I have global like: ^myglobal(varX) = $LB(var1,var2). I need to delete all globals that have variable var1 in that list same without a need to iterate through all globals and checking their value.

Exact example:

- in database exist following:

^myglobal("Marek") = $LB("code2",1400)
^myglobal("Ondrej") = $LB("code1",12)
^myglobal("Nikita") = $LB("code2",32)
^myglobal("Evgeny") = $LB("code1",76)
^myglobal("Maks") = $LB("code2",99)
^myglobal("Eduard") = $LB("code1",14)
Now! How to delete all globals that have in list in the first place value "code2" please? It doesn't hav

3
0 1309
Question Marek Bernád · Jul 3, 2017

Good day, I would like to find out the size of Caché ObjectScript variable in order to guarantee that my program will not leak, equally in terminal and Caché globals.  For example how huge number I can store in that variable ? And what happen in Caché when variable will leak ? How is this behavior treated? (how much memory is reserved for common variable?)

Thanks  in advance for your answers.

2
0 760
Article Tirthankar Bachhar · Sep 27, 2016 3m read

How do we generally create an error object of %Status?

Set status=$SYSTEM.Status.Error($$$GeneralError,"Something went wrong")

Now, like $$$GeneralError there are many more macro defined within %occErrors include file by Intersystem which we can use.

i.e.
#define GeneralError                            5001
#define CacheError                               5002
#define NotImplemented                      5003
#define FeatureNotSupported               5014
#define DataMissing                             5022
#define FileCanNotCopy                       5024
#define FileAlreadyExists                      5














6
1 1568
Question Alexander Koblov · Feb 5, 2016

Hi.

It is easy to receive JSON representation or dynamic Array from %ListOfDataTypes:

set l=##class(%ListOfDataTypes).%New()
do l.Insert("a")
do l.Insert("b")
do l.Insert("c")

set arrStr=l.$toJSON()
zwrite arrStr
set arr=l.$compose([])
zwrite arr

How to make backward conversion? How to receive %ListOfDataTypes from dynamic Array an JSON string?

I've tried

SAMPLES>set list = ##class(%ListOfDataTypes).$fromJSON("[""a"",""b"",""c""]")

%FromObject+21^%Library.RegisteredObject.1 *%Exception.General Compose Compose %FromObject Unable to map from %Library.Array instance to %L
3
0 1524
Question PILAR GUERRERO · Jun 29, 2017

Hello...

I need to convert a array  (JSON) in a List Of String. I think, there is some method that does it directly.

Something like that:

SAMPLES>set list = ##class(%ListOfDataTypes).$fromJSON("[""a"",""b"",""c""]")

%FromObject+21^%Library.RegisteredObject.1 *%Exception.General Compose Compose %FromObject Unable to map frm %Library.Array instance to %Library.ListOfDataTypes

I have reading about this but I don't found some trick to help me.

https://community.intersystems.com/post/how-convert-json-listofdatatypes

Thanks!!

1
0 644
Question Amir Samary · Jun 28, 2017

Hi everyone!

We have many severs (DEV, QA and LIVE) besides many other slave servers (about 133) that are running Caché instances. Before writing this utility myself, I would like to know if anyone has done it before. We need to change the SuperUser password and do other credential setups like this on all of these servers and we don't want to do it one by one.

4
0 787
Article Jonathan Pham · Nov 1, 2016 1m read

A few customers have seen this happen, so I thought it would be worth mentioning here on the Developer Community.  This could affect  users running versions between 2014.1.3 and latest who install or upgrade Wireshark.  There is a bug in the Visual C++ 2013 redistributable shipped with the current Wireshark 2.2.1. 

This is from Microsoft’s bug report  https://support.microsoft.com/en-us/kb/3138367 :

“When you install an updated redistributable package, binaries for non-target architectures are removed. For example, after you install an update for an x86-based application, the x64 Visual C++

6
0 1013
Question Mike Kadow · Jun 12, 2017

I would like to start a discussion regarding Caché Objects and Caché SQL.

It is my understanding that the creators of Caché Objects see Caché SQL as the reporting arm of Objects and as such SQL is essential to Caché Objects.

I once met a Caché Objects programmer who was writing code to $Order through the Globals because that person thought that Caché SQL was too slow and inefficient. I attempted to convince the person otherwise.

So, what say you? Is SQL essential to Caché Objects?

Or

Is Caché SQL a nice to have but we can do without? Is it too slow? Is it too inefficient?

I really would like to have

29
0 972
Article Vitaliy Serdtsev · Jun 22, 2017 4m read

This is a translation of the following article. Thanks [@Evgeny Shvarov] for the help in translation.

This post is also available on Habrahabrru.

The post was inspired by this Habrahabr article: Interval-associative arrayru→en.

Since the original implementation relies on Python slices, the Caché public may find the following article useful: Everything you wanted to know about slicesru→en.

Note: Please note that the exact functional equivalent of Python slices has never been implemented in Caché, since this functionality has never been required.
And, of course, some theory: Interval treeru→en.

All right, let’s cut to the chase and take a look at some examples.

1
0 750
Question Nikita Savchenko · Jun 15, 2017

This post is originally posted on GitHub.

This discussion is open to anyone who use or know about WebTerminal project. It is a result of a long story of the project development, testing and maintaining.

While WebTerminal greatly improves user experience by enhancing standard terminal with additional features, there are numerous issues (#77#92#81#87 and others) showing that it performs not as expected in some cases, and does not support some very basic things (like $ZA/$ZB variables). The reason is in fact that WebTerminal project tries to reimplement Caché TERM behavior over Caché ObjectSc

26
0 898
InterSystems Official Steve Brunner · Jun 26, 2017

InterSystems is pleased to announce the availability of the Caché and Ensemble 2016.1.4 maintenance releases.

 

For a complete list of the corrections, please review the release notes.

 

Caché and Ensemble 2016.1.4 are available on the same platforms as 2016.1.3.  For complete platform details, please refer to the Supported Platforms document.

 

Availability of HealthShare Health Connect will be announced separately.

 

The version number of the kits for these releases is 2016.1.4.104.0

0
0 484
Edit
Question PILAR GUERRERO · Jun 26, 2017

Hello,

I have a problem when i take the adapter: EnsLib.FTP.OutboundAdapter. 

I want to write a file, but if the file already exist using the method ..Adapter.PutStream(name,file) and in my setting "overwrite" is true. FTP response me this message:

<descripcion><![CDATA[ERROR <Ens>ErrFTPPutFailed: FTP: error al colocar archivo '803430600001072790112416-19941214-1233287355C-347.pdf' (mensaje='Error in SFTP Put('D:\Ensemble\ABC\NAMEAPP\NAMEAPP_G\stream\HnhZ32Fb1WDatA.stream','ABC/803430600001072790112416-19941214-1233287355C-347.pdf') ERROR #7500: Error SSH '-2146426877': SFTP Error [801020
2
0 21
Question Richard Roeder · Jun 20, 2017

Hi all,

I trying build a project with .NET and Entity Framework in the Code First method, but Caché return the error " 'VARBINARY' is not a supported type for CAST" when run this sql code:

INSERT "dbo"."__MigrationHistory" 
       ( 
              "MigrationId", 
              "ContextKey", 
              "Model", 
              "ProductVersion" 
       ) 
       VALUES 
       ( 
              '201706131048154_InitialCreate', 
              'CACHE2.SchoolContext', 
              cast( 0x1F8B0800000000000400CD59CD6EE33610BE17E83B083A1 ... d89cc74ff4e1285e7df81769242ce52e1f0000 AS 
3
0 827
Question André Rothe · Jun 22, 2017

I try to find a function, which generates hash values of columns. In MS SQL Server I can use

select hashbytes('sha2_256', my_column) ...

to create hash values of my_column. Is it possible to use such things in Caché?

Thank you
André

1
0 1376
Article John Murray · Jun 21, 2017 1m read

Recently I was conducting a remote support session with a site. The desktop they were sharing with me was on a PC configured with German as the native language. Since my German is rather rusty, and virtually non-existent when it comes to computing terms, I was glad to be able to switch the Portal session into English.

This is done from the page that appears when you use the About link:

All I needed to remember was that the About link is the second one, and the language selection dropdown is at the foot of that page.

0
0 454
Question Ivan Tioh · Apr 11, 2017

It is possible to update Cache object property from Python using the following Python code, with import of intersys.pythonbind3:

my_object.set("my_property",["A","B","C"])

However, I am unable to save 2D %List with 2D Python array like the following:

my_object.set("my_property",[["A","B","C"],["1","2","3"]])

I am not sure whether this is Python-Cache bind flaw or design issue. Is there any alternative/ workaround to do the same for above?

3
0 443
Question Evgeny Shvarov · Jun 20, 2017

Hi, Community!

How do you store the source files of your Caché project? What is the directories structure? What are the benefits?

I prefer the following structure:

/cls/package/subpackage/class.cls

/mac/package/routine.mac

/int/package/routine.int

/inc/macro.inc

/dfi/folder/sample.pivot.dfi

Example

Benefits: 

  • folders are packages.
  • easy to understand what type of sources are in the project.

What is your approach?

4
1 1397
Question CM Wang · Jun 19, 2017

Hi,

I want to attach one local namespace on instance A to the database on instance B.

How could I use ECP to achieve my goal?

Should I config instance B as ECP data server? If so, how could I explicitly specify which database on instance B could be exposed ?

Thanks for your help.

4
0 637