#Caché

1 Follower · 4.5K Posts

  

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

Documentation.

Discussion Daniel Tamajon · Mar 19, 2019

Hi! We have received a request to create a new rule on CachéQuality to identify when a developer uses double quotes (" ") within any SQL statement.

We have been asked many times about SQL validation rules, and we would like to open a debate to allow everyone discuss what would you like to be checked on a SQL statement.

Current examples are for basic situations:

  • Using SQL.Statement class:

Set stmt = ##CLASS(%SQL.Statement).%New()
Set query = "Select Val1, Val2 FROM Table WHERE Val1=""SomeCondition"""

  • Using embedded SQL
13
0 636
Question Rueben Van Mol · Mar 14, 2019

Hello,

Last weekend we've updated our Caché version to 

Versie: Cache for Windows (x86-64) 2018.1.1 (Build 312U) 

I'm using Studio to develop. I've been using the built-in debugger and it has been working nicely. But now, since the upgrade, I'm getting this error when trying to debug any routine or class method:

Executing ##class(Blue.App.Handler.Adsolut).TestConnection()
<COMMAND>zDebugStub+30^%Debugger.System.1

This is the code for the classmethod I got the error on;

Class Blue.App.Handler.Adsolut Extends %RegisteredObject
{
ClassMethod TestConnection()
{
  w "ok"
  q
}
}

11
0 1072
Question David Kilburn · Mar 29, 2019

I want to upload several files using the html tag

< input multiple="multiple" name="BulkFileUpload" type="file">

. The upload.csp page in the SAMPLE namespace only shows how to extract a single file from the MimeData on the %request object. I cannot fathom how to extract multiple files from the MimeData in the %request object in cache. Can some kind soul explain to me how to do that?

2
0 530
Question Rodrigo Souza · Mar 28, 2019

Hope someone can help me,  so i was developing a script and during the tests I was using the csession to execute a method. Also i thought i had to stop the instance i was using, so I used the ccontrol stop [instanceName] to stop the instance, but when i restarted the instance i got this error trying to start my production, I have an idea of what's the problem but i don't know how to fix it.

2
0 872
Question Richard Newberry · Mar 26, 2019

Good morning

I'm probably overlooking something very basic, but I'm running on Win2016 with Cache  2016.2 - All the work I am doing is in INT routines, but I'm making some calls to the Host File system using $ZF(-1).

I have a few mapped Network drives that are mapped in Windows, typically these are locations where I want to back up some files.

My process is quite simple:

1. Read data

2. Zip data files using RAR

3. Create folder on Network drive

4. Move RAR files to new network share.

I've tried a few different commands:

S LOC="G:\RAN\Backup1\",CMD="MD "_LOC,X=$ZF(-1,CMD)

6
1 780
Question Steve Hayworth · Mar 25, 2019

First time post, also a new Cache developer, hence the <Beginner> tag.

If our data has Predefined terms in a dictionary, and a user can add terms on their own, can the terms exist in different tables?

Lets call the tables "Terms" and the user data in "UserTerms".

If a third class definition has a property of "Term" can it not be either Terms or UserTerms?

I'm leaning towards using a Subclass strategy where the pseudo "Parent" (forgive me) is  Dictionary.Term and the child is along the lines of Dictionary.Term.User

5
0 385
Question Alice Shrestha · Mar 26, 2019

Hi, 

We recently moved our cache instance from windows 2012 to windows 2016 and when i try to now import % routines  i'm getting the following error  "Unable to obtain a write lock on this routine because either another user has the routine open for editing or you do not have write access to the database the routine is stored in. This item will be skipped."

This is a fresh installation of cache and I've moved the cache.dat and csp pages across. It seems to work fine but can't import % routines which I need. 

Has anyone experienced this and can help? 

Thanks

2
0 217
Question Neerav Verma · Mar 26, 2019

Let's say we have a class 

AbcRequest extends Ens.Request, PropertiesBaseAbstractClass(has all my properties common to all request)

Prop1

Prop2 and so on

Now in my Business Operation 

I want to make a json dynamically from this request.

Yes obviously I can do is

Set requestDefinition = ##class(%Library.CompiledClass).%OpenId("MyCreateRequest")
Set JsonObject    = ##class(%DynamicObject).%New()        

3
0 417
Question Thembelani Mlalazi · Mar 25, 2019

I have an application using examples from the lottery example in samples name space how do I create a dynamically link based on the data displayed to add a record id to the link

the idea is to loop over the records displays fields and link to edit the shown data at the end of the record in a table format

1
0 344
Question James Davidson · Mar 20, 2019

I've seen a few password change posts, but I wasn't 100% sure it was the same process, so I am asking here. We periodically have to change the passwords for a few Cache user accounts across several servers. Is there a process/script to change these passwords without having to go into the web portal on each server?  Thanks so much, and I apologize if this was covered in some of the other articles that I've run across. Just looking for the best method.

3
0 442
Question Thembelani Mlalazi · Mar 12, 2019

I am trying to convert a string to date but can not get it to work I have  function that I would like to take in a date string and covert it to date object

here is the ezample so far can not get it to work any help appreciated 

set p="12/03/2019"
 
w $System.SQL.TODATE(p,"YYYY-MM-DD")
 
<ILLEGAL VALUE>todate+32^%qarfunc

if I try this still get the wrong value returned

set p="12/03/2019" 
w $ZDATE(p,3)
1841-01-12
6
0 3371
Question John Peeke · Mar 19, 2019

Hello all,

I am having some issues creating a docker image with a fresh cache installation. The error that I am getting right now is that gzip is required for a cache installation, but was not found in my system. Even though, this is shown as installed in the base centos 7 image. My host machine is Windows 10 using the latest docker version.

Here is my dockerfile, its simple:

9
0 1239
Question Mark Turner · Mar 15, 2019

I have a DR Mirror   with a WIJ that is 5 times as large as the Primary Failover member. My Read-Write Reporting mirror WIJs are the same size as the Primary.  I don't  know why the DR WIJ i so large and would like to shrink it to the same size as the others.  Any suggestions are welcome. Thanks!

3
0 578
InterSystems Official Andreas Dieckow · Mar 14, 2019

Caché  2018.1.2 and Ensemble 2018.1.2 maintenance releases are now available.    

Full product installation kits can be downloaded from the WRC Software Distribution site.

For information about the corrections in this release, refer to the release notes.

This release adds support for Ubuntu 18.04 and Windows Server 2019.1 operating systems. You can see the details of all supported platforms inthis Supported Platforms document.

 The build corresponding to this release is 2018.1.2.309.0

1
0 856
Question Chip Gore · Mar 13, 2019

Hi -

I'm having odd behaviors on my EC2 hosted IRIS Community instance.

When I configure a "custom login page" in the System Management Portal for my web application I'm seeing a few different behaviors that are under documented (and also undesired)

The old Caché documentation indicates that the custom login page could be a ".csp" file, but this seems to nor be the case (i kept getting "not found" errors, even though I could bring up the page directly from the url FOR the login.csp file. To get around this, I created an HTML file and then, at least, the login page could be found to be rendered.

2
0 645
InterSystems Official RB Omo · Mar 14, 2019

March 14, 2019 – Alert: Data Integrity Issue with Mirror Database Catchup

InterSystems has corrected a defect in our mirroring technology that can result in inconsistency between mirrored databases. This defect exists for currently released Caché and Ensemble versions beginning with 2017.2 and for InterSystems IRIS Data Platform version 2018.1.

0
0 392
Question Alexey Maslov · Jan 31, 2019

Sometimes global mapping of the same globals can be defined in different ways. E.g., I need to define it for 3 globals ^qAuditC, ^qAuditLog, ^qAuditLogC from the same database named APP-NOJOURN. Which approach should be better from the performance point of view?

1) qAudit* => APP-NOJOURN (one record in global mapping table)
or

2) qAuditC => APP-NOJOURN
qAuditLog => APP-NOJOURN
qAuditLogC => APP-NOJOURN (three records in global mapping table)

3
0 640