Hello!

I'm new to the system I'm working on, and I have a part of a statement that needs to grab the previous month.

....and MONTH(TX3.date_of_service)= MONTH(dateadd(mm,-1,GETDATE()))

However, when it hits January, I'm left with month 0.

Does anyone know a workaround to grab December of the previous year, while still functioning normally for the rest of the current year.

Thank you!

0 4
0 155

I am familiar with $TEXT which can get you any line in the current routine provided you know the offset. For example, $T(+1) will get you the first line of the current routine at the run time. In the same vein, how do I reference the current line number/offset at the run time? Something like $T(+$CURRENTLINENUMBER) where $CURRENTLINENUMBER is not yet known to me function. The sample below would write 3 as the line number.

RTNNAME
S A=1
W $CURRENTLINENUMBER

1 13
1 400

I have a registered object class that extends %XML.Adaptor and I want to convert an object of it into canonical XML.

From reading the documentation and some trial and error, it seems like I would need to use %XML.Writer to write the object to XML first using the RootObject() method, then read it with %XML.Reader, and then use the Canonicalize() method of %XML.Writer to write it out again.

Is there a better approach?

1 2
0 361

I have a CSP page that throw a "414 error - Request-URI Too Long" when I put lot of text (eg : 10000 characters) into a field of a submitted form. The form is submitted using POST method.

Based on some experiments I made, it seems the max size of a URL is around 8200 characters.

What is the official limit, and is there a way to increase it ? I searched in the documentation but couldn't find anything.

1 5
0 2K

Was wondering if anyone had a simple way of calling ##class(Ens.Director).EnableConfigItem() within a Business Process or adding code to a Custom Service to start or stop the object?

The use case is that I have a Process that uploads a file into a external SQL table. When it is finished I want it to kick off another Service that does the processing of the data that it just uploaded. Once it is finished the response is sent back to the service and when the service receives the response from the process, I want to stop that service from running.

so...

0 8
0 322

Similar to: "set obj = ##class(myClass).%OpenId(id)", which give the an instance of the object with given ID, is there a way to implement a function/classmethod to return the same by providing both class name and ID as a parameter, such as: getObjectInstanceByNameId(className As %String, id As %Integer), using ObjectScript code?

1 7
0 766
Question
· Dec 13, 2022
Ignore BREAKs

Hi!

I'm running a unit test via terminal, and sometimes someone from another team/squad add a few BREAKs and my tests stop until I skip one by one.

Is there a way to ignore BREAKs?

0 7
0 278

Hi,

I have two versions of Cache running on two separated servers. In one server, the version is 2018.1, and have the web application 'api/atelier', and the other server the version is 2016.1.

The question is, can I export the web application 'api/atelier' from 2018.1 and import/install it on 2016.1 version?

Thanks!

0 6
0 329

Hi!

I'm trying to install a ZPM package in my 2018 cache to use swagger-ui in my api-rest, but when I execute command line:
Do $System.OBJ.Load("/mypath/zpm.xml","ck")

I receive this error message:

ERRO #6301: Erro no Parser XML SAX: Linha: 2 Deslocamento: 39 Este arquivo não parece ter sido exportado pelo Caché, não é possível importá-lo.
ELEMENTO DE ORIGEM: %ZEN.Component.html (htmlContent)

I'm trying to install the version: zpm-0.5.1

Can anyone help me?

0 3
0 167

Hi

I have two tables: one a local table using cache and the other is via an SQL gateway connection to an MSSQL Server via a 64bit ODBC driver (ODBC Driver 17 for SQL Server).

When I try to join them on a date field I don't get any matches, and I know that there are matches, e.g. running both views separately returns resuls for 30/11/2022.

The following statement returns rows for the first table r, but nothing for the table l

0 5
0 315
Question
· Nov 18, 2022
Upgrade Caché version

Hi everybody!

I'm new to a Caché world and need some help! Where I work we are running Cache 2016.1 version in a server, and 2018.1 in another server. I want to upgrade the version 2016.1 to 2018.1, but I fear it can raise some errors tha I cant resolve yet. My doubt is, if I upgrade it will run ok?

Thanks in advance!

0 3
1 441

Hello everyone,

I have a doubt, its possible to use interface like C# using COS?

Remember, interface is different from Abstract Class, because a abstract class can implement code in the method, so I don't want this, I want only define the methods from Class, not allowing implement code.

2 5
0 653
Question
· Nov 14, 2022
Image Download from URL

Hello,

I'm currently struggeling with a HTTP request to a URL, which contains an jpeg image file.

Testing the request with a browser or Postman results in the image being shown normally.

Using a %Net.HttpRequest with different configurations has resulted in a corrupted file.

My code works for some URLs from other servers perfectly fine, but with some it produces corrupted file contents which do not represent a jpeg.

0 5
0 380

Hi developers!

As a follow-up to my previous post on the Node.js Native API, I created a quick poll because it may be interesting to see what technologies developers are using in their applications around the world with IRIS & Caché. I put a poll below, just check all boxes you have used or plan to use with InterSystems technology.

Thank you all for your cooperation!

1 1
0 380