#Caché

30 Followers · 4.5K Posts

  

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

Documentation.

Question Stefan Cronje · Jul 17, 2017

Hi,

I have a situation where I write a character stream to a file. The file content gets signed and the signature is sent to a service provider together with the file content.

The signing is done using openssl.

This works perfectly on a dev PC, which is runnning Windows and has a little-endian architecture.

The problem is as soon as I do this on the server, which has a big-endian architecture, the signed value is incorrect according to the service provider.

The content is signed using RSA SHA256 with PSS padding.

I've had a look at $nconvert, $sconvert, etc., but can't get to a solution.

8
0 3467
Question Russell Knight · Jul 17, 2017

Greetings,

If given a global, how can I discover information on that global?  More specifically,  how can I discover how many indices it contains?  ie:  ^G(1,2,3,4,5)   How can I discover that there are 5 subscripts within the Global ^G if I did not already know.

Please advise, and thanks in advance for everyone's time.

3
0 465
Question Mack Altman · Jul 12, 2017

It is my understanding that when a routine accesses a global it is temporarily stored in global memory. While the global is within global memory, any other routine would be able to readily access the global from memory and not from disk so long as the same node is being utilized.

For example, RoutineB() would be able to access ^Global(1) and ^Global(1,2) since RoutineA() utilized them, but RoutineB() would have to read ^Global(1,7) from disk as it was not utilized by RoutineA().

2
0 482
Question Thiago Zenaro · Jul 13, 2017

Hi everyone

Is there any way to change a class definition (especifically a query definition during the compilation time)?
The idea is: 
    I have an abstract class with a parameter where I will define the ROWSPEC of a query and some methods to populate e temporary table
The implementation class will override the parameter, specifying the ROWSPEC of this implementation, and the methods will populate the rows in the same format as the ROWSPEC.

4
0 739
Question CM Wang · Jul 16, 2017

Hi 

I have two persistent classes defined. Lets call it Parent and Child.

Child class is one of the property of Parent Class.

I would like to define a index on Child class.

So what is the default behaviour I defined a index on a non simple data type member?

Any possibility that I could customized the behaviour ? For example. Child class has three properties.

Could I configure the index to index any combinations of these three properties?

Thanks for your help.

1
0 712
Question Laura Cavanaugh · Jul 14, 2017

I'm trying to recreate a smaller copy of our DEV machine on a sandbox instance.  I installed a new instance, and thought it would be a good idea to copy over a few cache.dat files from the critical namespaces (but not all of them), and start from there.

However, I can't compile any UI files in my new instance because I'm getting a <PROTECT> error on the %qCacheMsg global -- for any element that displays text (i.e. the first <label> that's encountered) the generated code is trying to get text from the global  ^%qCacheMsg("%Utility","en",node) = text -- from a node that doesn't exist.

1
0 483
Question CM Wang · Jul 14, 2017

Hi,

I have a UrlMap like the one below.

<Route Url="/Results/:queryID" Method="POST" Call="QueryResults"/>

What if I have to pass two parameters to QueryResults, how to do configure Url?

Something like Url="/Results/:queryID/:parameter2"   ?

Thanks.

1
0 790
Question Jose Antonio Cañizares · Jul 14, 2017

Hi all,

We faced a problem where we would like to map a $lb object to its corresponding data model structure in order to later on export it as JSON.

So imagin that we have something like this that actually maps to a persistent table with its structure. 

$lb("",,,,,"",,,"BOOLEAN","0",2,2,"1",,"bla",$lb(,,"bla","20050502123400"),"",1,"bla",,0)

Is there a way to transform this $lb (without the need of openig the object itself) to a JSON object with the proper table fields as properties?

Many thanks

9
0 578
Question Natasa Klenovsek Arh · Jan 12, 2017

Hy.

I set up cache in container, which is working fine. But when accessing managment portal the default user was alway Unknown user and no username or password were required. So i disabled the Unknow user in the Security section, but now i keep getting an error access denid. 

9
0 3679
Question Russell Knight · Jul 12, 2017

Greetings,

How do I organize a wildcard search with respect to a database search?

Example of what I am trying to do:  s x=$o(^G("ABC","A*",x))

Trying to navigate through the ^G global for all occurrences of "ABC", and "A*" ("A"+wildcard) but I am new to M and don't know positively how to do this.  Perhaps I don't use an "*" at all, rather; another convention altogether.

Please advise.

Thanks in advance for everyone's assistance.

2
0 631
Question Eduard Lebedyuk · Jul 10, 2017

Hi, Community!

And so I continue with publishing of the tasks for the Final round of InterSystems Contest on InterSystems Caché and DeepSee as a part of IT Planet Student Championship in Sochi. This year we had about 2 000 participants in InterSystems Contest.

One of the tasks for the finals was to crack the black box and another to output 9876543210!

Here's the next task: gravity!

3
0 454
Question Rubens Silva · Jul 12, 2017

Greetings, can someone give me some help? I'm trying to use job for a instance method, as it's described here but...
Anyway, I have a method like this:

Method PrepareInstance(path){set ..Tool = ##class(Tool).%New(path)do $System.Event.Signal($zparent)}

That is being called like this:

Method TestPurge() As %Status{job ..PrepareInstance(..GetTestDirectory("../fixtures/_/dummy-project"))::10set msg = $System.Event.Wait("",10)
}

But it fails because:

<METHOD DOES NOT EXIST>zTestPurge+1^UnitTest.Tool.1 *PrepareInstance
5
0 518
Question Mike Kadow · Jul 11, 2017

I am working with Caché Relationships.

I know how to iterate through the One side of the relationship and for each One iterate through all the various Manys.

What I have been trying to figure out, is the code (I can put into a Class) that will start at the top of the Manys, iterate down and for each of the Manys, pull the associated One.

I can do this with SQL or Globals, but I want to use only Class type code.

Is that clear? Any help?

6
0 714
Question Rubens Silva · Jul 11, 2017

You might find it useful or not. It depends on what you can imagine it to be used with, like I had to.

Either way, I created a lib that can fetch environment variables from a file or from the OS where Caché is running.

Mostly know as dotenv. Many languages have it, so why not Caché?
The usage is pretty simple:
If you want to use OS env vars exclusively, just use the method:

##class(DotEnv.Parser).FromOS()

Otherwise, if you want to specify a .env file containing your variables to complement the OS ones use the method:

##class(DotEnv.Parser).FromPath("/path/to/file")
3
0 540
Question John Matson · Jul 10, 2017

Greetings,

I am working on the first of many triggers which will have identical code upon row insertion or update of a single column.  According to the document I should be able to define a multiple-event trigger using Cache SQL/DDL.

Here is a link to the current CREATE TRIGGER documentation.  Within the description section is the following paragraph:

1
0 1138
Edit
Question Stella Ticker · Jul 7, 2017

There is a need to send a SAML token from a local cache web application to an external web application in order to grant these cache web app users access to the external web app. Is it possible to use SOAP SAML token functionality to do IDP initiated authentication with Cache acting as the IDP server? The example in this online course shows a code snippet of the service web method that adds  the token to the outbound SOAP message. So I am assuming , this would be returned to the client in response to a client request of some sort. However, if a service needed to  send an unsolicited outbound

0
0 38
Article Vitaliy Serdtsev · Jul 7, 2017 19m read

Quotes (1NF/2NF/3NF)ru:

Every row-and-column intersection contains exactly one value from the applicable domain (and nothing else). The same value can be atomic or non-atomic depending on the purpose of this value. For example, “4286” can be
  • atomic, if its denotes “a credit card’s PIN code” (if it’s broken down or reshuffled, it is of no use any longer)
  • non-atomic, if it’s just a “sequence of numbers” (the value still makes sense if broken down into several parts or reshuffled)

This article explores the standard methods of increasing the performance of SQL queries involving the following types of fields: string, date, simple list (in the $LB format), "list of <...>" and "array of <...>".

0
0 1202
Question Chris Sprague · Jul 4, 2017

Hello,

I'm currently exploring alternatives to CSP/services and ODBC/Sql Maps for access to Caché. I'm not seeing a library which would interest me, so am considering creating one myself.

Does 'CacheConnection' in C# use RPC of some sort, or a defined protocol to communicate with Caché, or does it do so over telnet with scripted commands? I would assume the former. If so, is this a publicly documented protocol that can be implemented by library developers?

Any guidance in this area would be appreciated.

9
0 889
Question wx fg · Jul 5, 2017

hi

    I restored one database on Server B with EXTSELCT^DBREST command from   backup file (this backup file is taken from Server A).  

When I execute select some rows from one table,  it return error like this, 

the same select sql can return correct data  in server A

But when I select other rows from same table on Server B, it return correct data.

Why? maybe the backup file corrupted?

Thanks

1
0 237
Question CM Wang · Jul 5, 2017

"SELECT  %SYSTEM.SQL_TableExists('table name') "could work as expected under SQL shell,

but for   "CALL %SYSTEM.SQL_TableExists('table name')" does not work (not any error reported, it just show nothing).

Is there any reason why CALL could not be applied to a stored procedure?

Thanks.

7
0 571