In writing some code on:

Cache for Windows (x86-64) 2015.1 (Build 429U) Fri Feb 13 2015 14:37:23 EST

I noticed an unexpected "ROLLFAIL" error when a Unique Index fail was generated in a %Save() call.

The object SHOULD fail to save, since the Unique criteria is not met, but I didn't expect to see a ROLLFAIL error as the "Last Error".

When running the following class code:

0 4
0 944

Hi Everyone,

I have frequently received this below error message in my ensemble 2009 Cconsole log.

" 11/08-13:05:06:114 (9784) 2 Skipping SET due to compare and swap failed on ^["^^e:\test\data\"]Debug("CalcTotal1") for records in e:\test\data\ addr=39745548 "

Please explain this, am very much trouble with this alert. And also want to know it will cause any system hangsup ?

please response quickly. Thanks

Archunan K.

1 5
0 503

Thanks for all replies in advance. In monitoring our audit log we are getting the error below. We have 4 different servers running CACHE 2014.1.1 and this is happening on all 4 of them. I have not been able to find what process is trying to logon but it is happening every 30 minutes. We have no user processes that are running so this has to be a CACHE process. Does anyone have an Ideal what could be running to cause this? What kind of trace can I run to determine what process is running it?

0 1
0 772
Question
· Nov 9, 2016
access php

Hi,

How to post and get data using php. I'm using a php external url. In the body in parsing the request as xml and when i execute this using fiddler it response the result as xml but when i consume it in classmethod it fails. I don't have a wsdl file how can i work it out?

0 2
0 431
Question
· Nov 7, 2016
web service

hi,

I have created a asp web service and it is hosted in our internal server. How can i consume that web service in cache class method? It is a soap web service with xml input and xml output. It works fine in all the browser.

0 3
0 484

Here's an easy one for you; before I spend another hour looking for the answer, how do you convert %ArrayOfDataTypes to an array (that could, say, fit into the %session.Data array, or maybe just some array named info()), and of course back again?

NS>s aodt=##class(%ArrayOfDataTypes).%New()

NS>w aodt.SetAt("lcavanaugh","username")
1
NS>w aodt.SetAt("organization","coolcompany")
1
NS>w ##class(%ArrayOfDataTypes).BuildValueArray(aodt,.array)

<LIST>zBuildValueArray+1^%Library.ArrayOfDataTypes.1

1 3
0 954
Question
· Nov 4, 2016
MakeDirectory

Hi All,
when I ran the Command to make a folder in particular directory its not working in terminal,but when i run the same command in studio output block it create the folder.
Used command:
S cmd="mkdir E:\DIRECTORY"
O cmd:"QR":10
Suggest Please.

0 4
0 535

Hi-

I have created a class that extends %Persistent and %Populate and have set the various POPSPEC attributes of my properties to control how the properties are populated. However, when I compile the class and try to run the Populate() method it tells me the method isnt defined.

Here is the class definition:

0 2
0 932
Question
· Nov 1, 2016
File size.

Hi everybody,

My name is Sérgio Fernandes and I'm from Brazil.

I need to get the size of file that the user wants to upload in my application.

I'm getting it name with %request.GetMineData("fileName").FileName, but not found it at Ensemble documentation how would i get the size of file.

My version is Ensemble 2013.1.6.950.0 and I'm doing it at csp.

Thaks

0 3
0 745
  1. Don’t use Python built into Mac. Because of System Integrity Protection (SIP) you will not be able to access the libraries that the InterSystems Python binding requires. The Python build into the MAC has baked in what libraries it can use.
  2. Install another Python. Don’t put this other ahead of Mac Python on path since this could break things. Apple regards its Python as part of the its OS, and may use that Python in its system operations.
  3. This Python will not be installed into the protected area.
4 0
0 350

hi,

1. Created a class(test) and added a classmethod(checkdata).

2. Assigned a object with xml.

3. Created a new class for response and initialized in classmethod(checkdata).

4. Created a new class for request parsing with list of object parameter.

5. While parsing xml in request for list of object, the result count is "0". But the xml has value for "2" object list.

6. XML has follow:

0 4
0 815
Question
· Oct 20, 2016
%UnitTest Code Coverage

Hi,

When we write unit test cases for cache object script code using %UnitTest.TestCase, what is the best way to write code to identify code coverage?

So, let say my unit test case hit all 10 lines of code of a method for a given class. So, unit test coverage should be 100% for that. But, using line-by-line coverage [(%Monitor.System.LineByLine] getting wrong percentage, because it also includes code comment/documentation as part of code. So, practically we can not ever achieve 100% of code coverage by using this API.

2 2
0 761

I have a persistent class where I am logging each CCDA I receive. I want to store all of the providers associated to that CCDA (many to one). In a relational database, I would have a child table with a foreign key to the primary table. I'm guessing the equivalent to Cache would be

1. Create a custom class (ProviderList) with the properties I want to store.

2. Add the class as a property of my CCDA persistent class.

Property Providers as Array of ProviderList (SQLProjection = "table/column";

Am I on the right track?

0 4
0 458

Here you have an easy way to write and execute COS code from your unix scripts. This way one does not need to write routines or even open Studio or Atelier. It can be an option for simple and small actions for instance things like installation tasks or compiling.

See sample bash script (compile.sh) to compile classes:

6 2
0 865

Hi


I have been working on changing a web application from using %FileBinaryStream to storing and serving the file content from a %Stream.GlobalBinary property, stored in a new database. I have managed to migrate the data across, and have also been able to redirect the stream so that it is being served through the web link. However, the previous method set attributes on the File stream to have the stream be rendered as the original file type through MIME, using this code

0 2
0 955

Hi all,

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

ChildClass has parent relationship to ParentClass

0 1
1 623