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.5K

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.3K

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.4K
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.1K

Hi All,

I have created a REST class in which have the Parameter HandleCorsRequest = 1;

I can able to access the API using Postman, but not with my web application. It throws the below error.

Access to XMLHttpRequest at 'http://localhost:52773/IrisVSCode/app/test' from origin 'null' has been blocked by CORS policy: Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource.

0 5
0 15.6K

Now I want to return a large amount of data to the front end. The string length has reached 40000 +, and the returned data needs to be encrypted by AES + Base64. I can convert the string into a stream. AES can use the AESCBCEncryptStream method to encrypt, but Base64 has no stream method。Anyone who get the solution would you kindly share the solution please。

Any help would be appreciated. Thanks!

1 10
0 12.9K

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.2K

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.1K

We use ExecureProcedure() to execute a stored procedure which returns a result set. But we see lot of "Invalid cursor state" errors when the result set is empty. The connection to SQL server database is made through ODBC.

ERROR #6022: Gateway failed: Fetch. + ERROR <Ens>ErrGeneral: SQLState: (24000) NativeError: [0] Message: [Microsoft][ODBC Driver 11 for SQL Server]Invalid cursor state

Here is the code snippet from the business operation class which uses EnsLib.SQL.OutboundAdapter

0 2
0 8.7K

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

Hi, I was hoping that someone could point me to the error in my ways. I am trying to follow the examples to setup Ensemble 2017.1 in a docker container on an Ubuntu 16.04 virtual machine.

I have a directory that contains

Dockerfile
cache.key
ensemble-lnxubuntux64.tar.gz

When I execute:

docker build -t ensemble-simple .

I am getting the following error:

0 2
0 7.8K

I'm building a .Net Core Gateway container. Here's the issue.

As a final step I'm building a .Net Core 2.1 library. It has a runnable dependency - .Net Gateway, which I need to start first.

However dotnet publish generates .runtimeconfig.json and .deps.json only for my library and not for my dependency (.Net Gateway).

Is there a way to force dotnet to generate .runtimeconfig.json and .deps.json for a dependency?

I have tried:

0 2
0 7.7K