#Caché

1 Follower · 4.5K Posts

  

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

Documentation.

Question Rubens Silva · Nov 9, 2017

Hello.
We're about to implement an application that could use WebSockets intensely so before we head to that direction we need to figure out about how some few things work. That being said, anyone care to give me some enlightenment?

  • What's the criteria for a new session to be created when using WebSockets?
  • What's the factor for calculating how many licenses to would be used when SharedConnection  is enabled for WebSockets?
  • Is there a way to use session in a way that it would optimize the license usage for a single user?
1
0 351
Article Danny Wijnschenk · Nov 25, 2017 4m read

This is (the end) of a series of programming challenges for beginners and experienced Caché programmers.

For an introduction : go to article https://community.intersystems.com/post/advent-code-2016-day1-no-time-t…

This is the 25th and last challenge of the 2016 series of Advent of Code.

In this challenge,  you have to send a signal out,  using the assembunny code interpreter that  we had to make in earlier challenges.

There is one extra instruction added to the assembunny language, which outputs a value (out x).

1
0 549
Article Danny Wijnschenk · Nov 24, 2017 11m read

This is a series of programming challenges for beginners and experienced Caché programmers.

For an introduction : go to article https://community.intersystems.com/post/advent-code-2016-day1-no-time-t…


Today, you need to find your way through a maze (again). There are 8 points of interest in the maze, and you have to visit them all, starting with point 0.
You may visit some points more than once, in random order. The challenge is to find the shortest path through the maze while visiting all points.

The maze looks a bit like this : 

0
0 296
Question Alexandr Ladoshkin · Nov 23, 2017

Dear community!

I have problem with index NULL value.  Unique index doesn't work for this case.  If I use insert and one of parameter is "NULL". Message of constraint doesn't appear and row is inserted into table successfully.  How Can I use index with NULL?

Class TestClassIndx Extends %Persistent
{
Property name As %String [ Private ];
Property age As %String [ Private ];
Property country As %String [ Private ];
Index IndextestUniq On (name, age, country) [ Unique ];
}

INSERT INTO TestClassIndx (name,age,country) VALUES ('1','2',NULL)

Best Regards 

3
0 767
Question Vivek Ranjan · Nov 22, 2017

I ran the below query in three different modes.  Coordinated Universal Time is 5 hours ahead of Eastern Time so there is difference in value from column 1 and column 2 in ODBC, Display mode, but not in Logical Mode. By default the query executes in ODBC mode when we query the data from outside world(via ODBC connection). 

I don't know  why query 2 and query 3 outputs different from query 1.

Query 1. Ran in Logical mode, DATEPART() took in memory stored timestamp data(stored in UTC)

'Hour ' returned are same for both the columns

3
0 502
Article Danny Wijnschenk · Nov 23, 2017 4m read

This is a series of programming challenges for beginners and experienced Caché programmers.

For an introduction : go to article https://community.intersystems.com/post/advent-code-2016-day1-no-time-t…
 

Remember the assembunny language we had to code on day 12 (https://community.intersystems.com/post/advent-code-2016-day12-leonardo…)?

There is a new instruction we have to implement which toggles an instruction x lines away (further or back).

0
0 373
Question Maks Atygaev · Nov 23, 2017

Dear community!

What do you think about webinar "Declarative programming on COS"? I want to do such one.

I am going to tell about main points of declarative programming and how you can implement it in your real projects.

Please feel free to write your opinion here.

Please if you wish to become a member of such webinar write me a message to atygaev.mi@gmail.com with subject "webinar".

1
0 284
Article Danny Wijnschenk · Nov 22, 2017 5m read

This is a series of programming challenges for beginners and experienced Caché programmers.

For an introduction : go to article https://community.intersystems.com/post/advent-code-2016-day1-no-time-t…


The goal of today's challenge is to copy data from one disk to another, problem is that the disks are not directly connected. Luckily they are in a huge grid, and you have to find a way to copy the data through adjacents disks, while honoring the disk usage (you cannot copy to a disk where data is already stored).


The input is a df-like disk usage listing.

0
0 656
Question Mike Kadow · Nov 15, 2017

Hello, this is going to be a stupid question, yea I know, there are no stupid questions.

Say, I have an Object Property, Name or Count or Title, or whatever.

How can I get a list, or find out all the different ways it can be expressed?

Example:

-Property Name As %Name;

-Property Name As %String="me"

-Property Name As %String [ Required];

But what other parameters, keywords, restrictions, lists, etc. that I can apply to this Property?

I have been search the I/S documentation and so far at least, I cannot find that sort of information, or in one place.

5
0 590
Article Danny Wijnschenk · Nov 21, 2017 5m read

This is a series of programming challenges for beginners and experienced Caché programmers.

For an introduction : go to article https://community.intersystems.com/post/advent-code-2016-day1-no-time-t…
 

The challenge of day 21 is about scrambling passwords.

There are a few functions you need to implement that will do operations on a string :

0
0 452
Question Marco Blom · Nov 21, 2017

Hello Community,

I have a simple question but somehow hard to find the solution:

this is a property in my class:

Property RelationAID As ZenCrm.Relationtypes;

this is my method to save:

ClassMethod PopulateMatrix(tvar1, tvar2) As %Status
{
set RelationMatrix=##class(ZenCrm.RelationMatrix).%New()
set RelationMatrix.RelationAID= tvar1
set RelationMatrix.RelationAType= tvar2
do RelationMatrix.%Save()
quit $$$OK
}

However the 'set' line does not work for the 'related properties.

I have tried: set RelationMatrix.Relationtypes.RelationAID but this failed.

Any suggestion? thanks!

2
0 492
Question Wendy Griffiths · Nov 21, 2017

We have an web application accessed using https, that uses CSP technology with frames.

The initial 'login' is via a single CSP page, which then redirects to another CSP page which creates the frames (4 in all) and loads a CSP page in each of those.  For the most part the frames load without error, but sometimes when logging in and sometimes while using the system ' 5916 Illegal CSP Request ' errors occur.

I say 'login' in inverted commas as a Cache login is not performed just an application login, I don't know if that's relevant so thought I'd mention it.

2
0 782
Question wx fg · Nov 20, 2017

I have restored one database from backup, but when I query from some of tables,   prompt error :

this error remain after restart Caché service

I can skip this error with %nolock in select query.

My question is: 

1. why there were locks after restart service?

2. Can I release/rollback these locks by sql so I can query without %nolock?

3
0 601
Question P Patz · Nov 19, 2017

I have a query that I am attempting to run, but inner query is being rolled up into the overall query - per the optimizer (and jobexam observation).  While I know that if the inner query runs first, I will eliminate a number of records (making the result set smaller, and return quicker).

Just an example of what I am attempting to do:

8
0 511
Article Danny Wijnschenk · Nov 20, 2017 3m read

This is a series of programming challenges for beginners and experienced Caché programmers.

For an introduction : go to article https://community.intersystems.com/post/advent-code-2016-day1-no-time-t…

We are almost there : after this challenge, only 5 days left till the end of this advent of code (I cannot wait to get my life back !) .

The challenge of day 20 is about a list of integer ranges. Some ranges overlap,  but there are also values that are outside any range.

You have to find out what is the lowest integer that is outside any range.
 

0
0 409
Article Danny Wijnschenk · Nov 19, 2017 3m read

This is a series of programming challenges for beginners and experienced Caché programmers.

For an introduction : go to article https://community.intersystems.com/post/advent-code-2016-day1-no-time-t…

Today's challenge is a variation on the White Elephant gift exchange (https://en.wikipedia.org/wiki/White_elephant_gift_exchange), in this case, by a bunch of Elves where only one can have all gifts.

0
0 498
Article Danny Wijnschenk · Nov 18, 2017 4m read

This is a series of programming challenges for beginners and experienced Caché programmers.

For an introduction : go to article https://community.intersystems.com/post/advent-code-2016-day1-no-time-t…

You walk into a room, step on a tile and hear a loud click...

Traps !

The challenge is about avoiding traps.

You can recognise if a tile is a trap by following scheme :

0
0 273
Article Danny Wijnschenk · Nov 17, 2017 4m read

#########
#S| | | #
#-#-#-#-#
# | | | #
#-#-#-#-#
# | | | #
#-#-#-#-#
# | | |  
####### V

<!--break-->

This is a series of programming challenges for beginners and experienced Caché programmers.

For an introduction : go to article https://community.intersystems.com/post/advent-code-2016-day1-no-time-t…


The challenge today is again a-maze-ing (as a wellknown president would say).

0
0 425
Question Mike Northrop · Nov 16, 2017

I'm trying to write a method to Export SQL Privileges from an instance by namespace, user, or roles. I've found two classes that might work:

  • ##class(Security.Users).Export
  • ##class(Security.SQLPrivileges).Export

One (Security.Users) exports an XML file and the other (Security.SQLPrivileges) exports an SQL file.

Neither of these options allows me to specify specific users or roles to export so I'll have to use them in tandem with something else. Is there something else that I should be using or do I need to find a way to filter on the backend with regular expressions or the like?

6
0 517