How do you populate and update test/initial data for you classes?
CSV tables? Globals export? And how do you update test data?
Here's one way I found useful for small projects.
InterSystems Caché is a multi-model DBMS and application server. See more details here.
How do you populate and update test/initial data for you classes?
CSV tables? Globals export? And how do you update test data?
Here's one way I found useful for small projects.
Hi all!
I need to call an API that has the following characteristics:
In the body the information is given through the form data.
I can not find documentation on how to make this call and how to get the answer (JSON).
Could you help with an example?
Thank you
Hello,
I am new to InsterSystems Cache - having a SQL Server background. However I am dealing with a Third Party who use InterSystems Cache to hold some of our data. To do some analysis I need to view a backup of the database. They are prepared to send me a backup.
My question is - how can I view this backup ( would this be the CACHE.dat file?).
Do I effectively need to have an installation of CACHE on my machine to be able to view this? Is it possible to view it from SQL Server?
Any help would be appreciated.
Thanks
Colin
Hi All,
Is it possible to call a Cache Routine using the .NET Cache Client instead of just SQL statements?
If so, can someone provide an example?
using InterSystems.Data.CacheClient;
using InterSystems.Data.CacheTypes;
Thanks,
-Matt
Hello all,
I have an XSL question and I wanted to see if someone within a community can help me out.
To Summarize: I am working with XSL documents, single and multi-pages.
Inside my style sheet XML document, which is supporting my pages, everything on the page, including a headers, footers and the items are calculated
based on the portrait measurements.
Pages come up on the screen as portrait, but sometimes, depending on dynamic data are wide, they do not print properly in portrait.
I'm writing to an ODBC connection to a SQLserver database, and I seem to be sending the wrong data type to a date colum?
set tSC = ..Adapter.ExecuteUpdate(.intRows,sqlInsert,$ZDATETIME($NOW(),3,2), pRequest.ComposerName, [...])
I think `$ZDATETIME($NOW(),3,2)` is ODBC datetime format:
Do I have it wrong?
Stephen
I got a quick answer from this forum yesterday so I'm going to try my luck again today! I've hit an error in another table when trying to extract through the Cache ODBC driver, but this one gives me less details and I'm struggling to pinpoint what might be causing the error.
The table I am trying to extract is called REF_TABLE_ONE.
Here's the Error:
[Cache Error: <<NOLINE>%0AmBx1^%sqlcq.PRD.2249>]
[Location: <ServerLoop - Query Fetch>]
Based on my research, it looks like the error results from something missing in a routine. I have limited access to this system.
Hi All,
Can someone help me getting the security features & standards which InterSystmes Cache adheres to ISO 27001 & other security & privacy standards.
Also if you can tell me the algorithm used for database encryption & key strength by default.
This is required for a security audit.
Thanks in advance. Ashish
In most cases, if one class depends on another, the class compiler will detect this and determine the correct compilation order. For example:
Yet sometimes, a developer needs to specify compilation order. InterSystems class definitions contain two keywords for this, DependsOn and CompileAfter, that are very similar but not identical.
I'm working on exporting data from an Intersystems Cache database through the Cache ODBC Driver. There is a particular table that is giving me an error message. The ODBC Driver crashes and reports an error from the Cache system. I think I was able to trace down where the error is coming from, but I do not know how to debug or fix the error.
The table I am trying to extract is called SEDMIHP.
Here's the Error:
[Cache Error: <<UNDEFINED>%0AmBd16^%sqlcq.PRD.Hello Cache Developers: I was curious if anyone has ever created a TWAIN interface to their Cache Application? I am new to TWAIN and hence the reason for this question. From what I understand, TWAIN is software used by various digital imaging software and TWAIN provides an API for applications to call to be able to import images into their application. I work with a healthcare application and was wondering what types of things are required for a Cache Web Application to call the TWAIN API to be able to load images into a Cache table.
HI Community,
I would like to store a tablepane currPage variable in %session.Data, and retrieve the value when returning from a detail page back to the tablepane.
My test code so far:
{
var table = this.getComponentById('relationTable');
var pageNo = table.getProperty('currPage');
alert (pageNo)
zenPage.SetPage(pageNo)
}
ClassMethod SetPage(pageNo As %String) [ ZenMethod ]
{
Set %session.Data("currPage") = pageNo
//&js<alert(pageNo);>
}
ClientMethod Test2button() [ Language = javascript ]
{
var pageNo = ""
zenPage.
Hello,
I am trying to copy an xml file generated on an Apache server into the Jenkins workspace post-build. I was thinking to use a 'send files over ssh' post-build script, but have not done this before and do not know how to refer to the file location on Apache server vs on Jenkins.
For example, if I want to copy from Apache's location of: "classes/UnitTest/Results.xml" into Jenkin's workspace: "/ReportFiles/Results.xml",
How does the script differentiate between whether the location address refers to the Apache server or Jenkins workspace?
Or is there a better alternative way to do this?
Hi I'm using ensemble/cache 2016 is a NTML auth possible. Any code examples?
Currently I've got
set hr3 = ##class(%Net.HttpRequest).%New()
set hr3.Username = "xxxxxx/xxxxxxxxx"
set hr3.Password = "xxxxxxx"
do hr3.Get("http://xxxxxxxxx/CaseNoteTracking/api/CaseNoteTrackingAPI/Get")
From the looks of things I need a http 1.1 request?
Please note, this article is considered deprecated, check out the new revision over here: https://community.intersystems.com/post/tutorial-websockets
The goal of this post is to discuss working with Websockets in a Caché environment. We are going to have a quick discussion of what websockets are and then talk through an example chat application implemented on top of Websockets.
Today in docs I found this example using NULL:
WRITE $LISTVALID($LB(NULL)),!simplified
zzdump $LB(NULL)and NULL can be case-insensitive:
zzdump $LB(null)seems the same as just:
zzdump $LB()But if null variable is defined then list would contain value from variable. Case sensitive in that situation.
Does anyone have any Idea what is this? Is NULL used anywhere besides as a list element?
How we can reduce the size of cache.dat file? Even after deleting the globals of a particular database from management portal size of its cache.dat file is not reduced.
Let Say I have
Class Carrier Extends %Persistent
Property Employee As Array of Class Employees
Class Employees Extends %SerialObject
Property Name As %String
Property Address As Array of Class AddressDetail
Class AddressDetail Extends %SerialObject
Property Street1 As %String
Property Street2 As %String
I can get value for Employee Name as Employee_Name.
But I want to Get Value of Address Street1 and Street2 of Class AddressDetail using SQL Query
How can I get that?
Let's say I have a property as a variable value:
set propName="Country"Is there a method to determine, should I quote it to access the object, so would the correct code be:
write obj."Country"or just simple
write obj.Countryis enough?
Hello,
I'm trying to set Caché-Python Binding on Mac, but there is a problem.
I performed installation and configuration of Caché-Python binding module based on the manual (URL)
including setting of PATH and LD_LIBRARY_PATH in "bash_profile",
and they seems to be done successfully (there was no error in the process).
However, when I execute test python file (test.py), it failed with error massage as below.
-----------------------Error Massage----------------------
Traceback (most recent call last):
File "test.py", line 2, in <module>
import intersys.pythonbind3
File "/$USER$/.
I'm finding that in a mobile app setting, that Cache is causing the worst User Experience that I have ever seen in a mobile app - I'm just saying this hoping that someone will be able to help me out, my intent is not to criticise Intersystems.
We have a Xamarin Forms mobile app that consumes web pages that are created by Cache. The app compiles into iPhone, iPad, Android Phone, Android Tablet, UWP (Windows 10, all of phone, tablet, and desktop), as well as MacOS.
The cache-generated html that we are wrapping in the app naturally uses a licence slot when a user opens the app.
The class method "test" in the following code snippet sends an HTML email with an embedded image. Edit the literal strings to change the embedded image, to address, from address, subject, and body of the email.
Class objectscript.sendEmailWithImage Extends %RegisteredObject
{
classmethod test() {
S SmtpServer = ""
S SmtpUserName = ""
S SmtpPassword = ""
S imgPath="C:\test.jpg"
set s=##class(%Net.SMTP).%New()
set s.smtpserver=SmtpServer
set auth=##class(%Net.Authenticator).%New() ; use default authentication list
set auth.UserName=SmtpUserName
set auth.Hi All,
Actually I am trying to implement a RESt API where in I will get ZIPCODE as request and I need to call external API which will take ZIPCODE as input and give State and City in response.
But the problem is the request is in XML Format and also response is in XML format.
Example :
https://XYZ.com/ABC.dll?API=CSLookUP&XML=<CSLookupRequest USERID="USERID">
<ZipCode ID='0'>
<Zip5>20024</Zip5>
</ZipCode>
</CityStateLookupRequest>
and in Response
hi, everybody!
i wanna connect to a remote server through Terminal.
after i add a server in [Preferred Server] and click the server name( [Remote System Access]->[Terminal] -> server name)
i got an Error dialog telling me that:
Failed to establish security context.
Reason:(-2146893042, 0x8009030e)No credentials are available in the security package
so do i miss some configuration?
Grateful for your help!
I need to select my result into a list and be able to loop through the list when query finished any help appreciated here is where I am
##sql(SELECT %ID INTO :IDArray() FROM MergeHyland.TypeTwoDimesionCollection WHERE GUID = :Key AND EndDate IS NULL)
for I=1;1:$LISTLENGTH(IDArray)
{
w $Data(IDArray),i
}
I need to automate the handling of usernames passwords, serverNames etc for use in the sending and receiving of emails, logging into SFTP servers etc etc for use within COS code
To manage external passwords we could use LastPass or any other proprietary password loggers, but I need to be able to call them as part of the automation (COS code) and occasionally visually look them up to "remind" the staff of their passwords.
any suggestions as to the best class data constructs to handle this scenario. Should the whole table be encrypted, only the passwords etc.
I have this query That I am trying to use in my class when testing on the terminal I expect to get the results printed on the terminal but I am only getting zero printed please can anyone out there advice on what I am doing wrong
Method PatientInfo(ID As %String) As %Status
{ #dim status as %Status=$$$OK
SET myquery="SELECT GUID, IDType,IDValue FROM MergeHyland.TypeTwoDimesionCollection WHERE GUID ="_ID
SET rset=##class(%ResultSet.SQL).%Prepare(myquery,.err,"")
WHILE rset.%Next() {
WRITE !,rset.GUID & ":" & rset.IDType& ":" & rset.Hi,
I'm using node.js to access to Iris.
Considering this globals:
^Customer(1, "Address", 1)="London"
^Customer(1, "Address", 2)="UK"
^Customer(1, "Name")="Jane K. White"
^Customer(2, "Address", 1)="Reigate"
^Customer(2, "Address", 2)="UK"
^Customer(2, "Name")="Peter R. Black"
^Customer(3, "Address", 1)="London"
^Customer(3, "Address", 2)="UK"
^Customer(3, "Name")="Paul J. Green"
I retrieve all customers with:
mydata.retrieve( { global: "Customer" },
"array",
function(error, result) {
if (error) {
// error (see result.ErrorMessage and result.

Neuschwanstein Castle
Tabular data storages based on what is formally known as the relational data model will be celebrating their 50th anniversary in June 2020. Here is an official document – that very famous article. Many thanks for it to Doctor Edgar Frank Codd. By the way, the relational data model is on the list of the most important global innovations of the past 100 years published by Forbes.
On the other hand, oddly enough, Codd viewed relational databases and SQL as a distorted implementation of his theory. For general guidance, he created 12 rules that any relational database management system must comply with (there are actually 13 rules). Honestly speaking, there is zero DBMS's on the market that observes at least Rule 0. Therefore, no one can call their DBMS 100% relational :) If you know any exceptions, please let me know.
Let's say I have this property:
Property FavoriteColors As List Of %String;
I heed to convert it to JSON using SQL or at least without object access (so direct global access).
What's the fastest way to do that?
I thought about JSON_ARRAY and JSON_ARRAYAGG sql functions but they don't do that.