NewBie's Corner Session 28 Various Methods to Traverse a Global
Welcome to NewBie's Corner, a weekly or biweekly post covering basic Caché Material.
Judging from the number of responses to Session 27 Traversing A Global, developers are passionate about their methods. I am not here to judge the merit of the various methods.
Over the next few pages I will demonstrate a number of methods to Traverse a Global. If you don't already have a favorite they may help you pick one.
I found one interesting moment in Cache Object Script. It doesn't have(or at least I didn't find) trimming function. By trimming I mean if a string has some whitespaces/tabs/carriage returns from very beginning or/and from very right, this function removes them.
Outlined below is an example of how to check if a directory exists:
Set directoryName="c:\temp\nosuchdir"
/* Check for existence of a directory - Return Value: 0 - directory does not exist; 1 - directory does exist */
Set directoryExists=##class(%File).DirectoryExists(directoryName)
If ('directoryExists) // do the processing for when a directory does not exist
Outlined below is an example of how to check if a file exists:
How do I change my login information for Cache Studio if I clicked the checkbox to automatically save my login info so I do not have to enter my username/password every time I open Studio?
We're creating a series of RESTful APIs that output data from a Cache database (made up of global storage that we've mapped to classes). I'm running into some problems with object-to-JSON conversions when relationships are involved. Eg:
ParentClass has children relationship to ChildClass
InterSystems created this video as a high-level overview of OAuth 2.0 technology, geared toward developers looking to learn the basics of OAuth 2.0. It will teach you how OAuth 2.0 works, what roles are involved, what benefits it can provide, and how InterSystems Caché can be used with this technology.
I need to do an UPDATE via SQL and I would like the statement to return the `ID` column of each row that is updated. MS SQL has an "OUTPUT" statement, but I don't see anything similar in Cache. Is there a way to do this?
We're developing Ensemble PoC and one day our frontend developer (who doesn't have Ensemble production running) said that Populate just doesn't cut it and he needs to see the real data. He needed only one object, but the problem was - it's a big object. Still, I checked ids of everything related and wrote this command (parts omitted, but you get the idea):
I have setup an async reporting mirror member with Read only access. My problem is that if I try to do any sql reporting against that data I am getting errors. I am sure that this is because the DB is read only, but I had assumed that setting up a reporting mirror would handle this.
I get a input from user.How to I retrieve the data from these input. I enter the program but its occurred Some error .So give an idea of how to retrieve the data from properties.