I'm having trouble creating a view in cache with query like:

SELECT column1, column2, column 3
FROM table
WHERE
(column1, columnn 2) IN (SELECT c1, c2 FROM table2 GROUP BY c1)
ORDER BY column1

I think the problem is in where clause, because it cannot take two columns .

the exact error: [SQLCODE: <-1>:<Invalid SQL statement>] [%msg: < ) expected, , found^ (column1,>]

Any idea on how to solve this?

Thank you.

1 3
0 108.6K

I need to pass a parameter string that contains slashes to a REST call.

I tried URL encoding, or making URL map to accept query parameter instead of path parameter but apparently we only allow for path parameters.

I can come with several workarounds, but these involve some transformation at client and then on server, but I'd prefer a direct support.

Q1: is there any Cache specific trick to pass slashes in path parameters

Q2: are we going to support query parameters in REST?

something like this would help:

0 18
0 43.4K

I have a query string that I am creating programmatically, based on some user inputs. The user might search on 5 fields, or 8 fields, or no fields.

In my sql statment, some of these fields require parameters in the %Execute statement.

For example:

if user picks lastname, sql = "select * from person where lastname = ?"

if user also picks age, sql = "select * from person where lastname=? and age > ?"

I then have these lines of code to create my result set:

set statement = %SQL.Statement

statement.%Prepare

0 28
0 22K

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?

0 2
0 20.5K
Question
· Apr 4, 2019
ODBC Drivers

Hi All,

I would like to download odbc drivers for Cache database to be able to install it on our SQL server.

I am trying to create a linked server to Cache database.

I couldn't find a link for the drivers, there was one post with FTP reference to download but it doesn't seem to work.

I will be grateful for any help.

Thank you

Sap.

0 8
0 17.2K

WebSockets look to be supported reasonably well in Cache. I have yet to use them in production so I am wondering how well it has worked for other developers.

In particular what happens when the browser does not support WebSockets, or when a firewall blocks the connection.

Have you had to write your own long polling fall-back?

I've read the documentation and found this interesting article...

https://community.intersystems.com/post/asynchronous-websockets-quick-tutorial

0 15
0 11.3K

Hi all,

I have an incoming JSON message with a string field exceeding in length the 'caché long-string limit' of 3641144 characters.

Using {}.%FromJSON(instream) I am able to create %DynamicObject properly. However, I am unable to access the long property, as in every assignment, I get the <MAXSTRING> error.

Is there any way for me to obtain contents of the 'too long' string field as a stream?

Thanks

Jiri

0 3
0 11.3K

I am still new to cache objectscript and am trying to figure out how I would go about removing the escape characters from my JSON below. When I call the $toJSON method it's adding the "\" character in the file path.

{"FileStatus":"P","Path":"\/somepath\/test\/test123\/filename.txt","InterchangeOID":"100458"}

My Code:

0 11
0 9.7K

Hi everyone,

This is:

Cache for UNIX (Red Hat Enterprise Linux for x86-64) 2016.2 (Build 736U) Fri Sep 30 2016 12:25:56 EDT

The server is on RedHat Linux while the browser is running on Windows (Firefox).

I am helping a partner build a complex modern HTML5 web application that talks with Caché using REST calls. They have been using %CSP.REST very successfully. Security works great as well.

1 11
0 9.2K
Question
· Nov 20, 2017
Cache ODBC - Access Denied

Hello,

I'm working on integrating a Cache database into an existing .NET project of mine. I'm trying to execute certain queries utilizing the Cache ODBC driver. The first error I ran into was "[S1000] [Cache ODBC][State : S1000][Native Code 417] Access Denied". The part that's throwing me for a loop though is that the application ran ~200 successful queries before I started getting that. After some of those Access Denied errors, they turned into "[Cache ODBC][State : S1T00][Native Code 450] Request timed out due to user timeout". This was all with the regular (2.5?) driver.

0 8
0 9.2K

Where can I download the Cache ODBC drivers?

Where can I download the Cache ODBC drivers for Windows?

I need to connect to a cache database by odbc but the FPTs that I have found do not work,
could you tell me where to download the ODBC drivers

0 14
0 8.7K
Question
· Jan 1, 2018
Send JSON Via HTTP request

Hi Guys,

Basically I'm looking for a sample what I can send data in aJSON format to a a webservice using an http request pls?

I've found some documentation on %Net.HttpRequest but a sample on how to connect to a Webservice and send data to it would be really helpful?

Our clients are running Cache & Ensemble 2014

Thanks

0 21
0 5.7K
Question
· Jun 2, 2017
Decoding Base64 PDF File

Hello, I am writing some cache code that will pick up a PDF file, Base64 encode the contents and then send on to a third party system within a Long String (via their API). I have been testing this and discovered that the PDFs do not open within the supplier system (I get an error saying that it hasn't been decoded correctly). I wanted to prove that the issue does not lie with the way that I have Base64 encoded it within Ensemble, and therefore as a test wanted to Encode the PDF stream, then decode the stream and write out to a new file.

0 13
0 5.6K
Question
· Nov 16, 2017
Caché service does not start

Help, after a day of coding, I wanted to backup my files. I found out that alle of my 3 instances of caché refuse to start.

the error says: cstart-exe-fout (112 Service for Caché instance did not start).

Is there a way to solve this? (off course the management portal does not work either.)

I think there has been a power interruption as the battery from my laptop does not work, and the power went off before

shutdown.

Thanks in advance!

0 9
0 5.2K