Question
· Apr 22, 2020
SQL Statement Highlighting

Hey Community,

my Caché Version: 2013.1 and can't update now.

is it possible to highlight SQL Statements like in embedded SQL with all the features from SQL Statements?

Actually I use SQL Statements with a simple string like:

set myquery = "SELECT TOP 5 Name,DOB AS bdate,FavoriteColors FROM Sample.Person"

But when the queries are more complex it will be very cluttered and unstructured.

0 2
0 231

Hey Community,

my Caché Version is 2013.1 and I can't update now.

I want to serialize a SQL Answer row into an Array filled with objects and then convert it to json.

Actually I use the following, which is very error prone when I have to do that often:

0 7
0 665
Question
· Sep 25, 2018
Terminal can not be connected.

■Setting up CACHÉ preferred connection server.
server name:localhost
ip adress:127.0.0.1
port:1972
Telnetport:23
web server port:57772
web server ip adress:
CSP server instance:
comment:
Authentication method=>password

■hosts
localhost 127.0.0.1

■os
windows10 (virtual box)

0 6
0 2K

Hi all,

I have a class that has been working so far :(

The class extends the EnsLib.RecordMap.Service.FTPService class and add some information for each rows.

Now, when it saves the object it is raising the following error

ERROR #5803: Failed to acquire exclusive lock error

I've seen the other question in the community and I've tried to unlock

1 5
0 1.2K

I am experimenting with Relationships, both Parent to Child and One to Many.

I have done some SQL look-ups and have searched through the documentation, however not in a lot detail, but wonder if there are more and better ways to access both sides of Relationships through SQL?

Thank you in advance for any help provided.

1 25
0 2K

hi all,

I am looking to make a JDBC connection to my Intersystems Cache using the JDBC driver 2.0.0.

I see the connection format is as "

   jdbc:Cache://<host>:<port>/<namespace>

"

What I really want to do is filter additionally by a certain database, i.e. connect my consuming application to a database under the namespace.

how can I do that? what will be the format

0 4
0 422

My database service is on the cloud server, and I access it on the company intranet. When I user the %request.CgiEnvs to get "REMOTE_ADDR", but what I have been getting is the company's external address. I can't get my IP address in the LAN.
For example, my computer IP address is 192.168.11.11, and my company's external public network address is 214.17.17. I can only get 214.17.17 by using %request.CgiEnvs("REMOTE_ADDR"), but not 192.168.11.11.

I only want to get 192.168.11.11.

0 6
0 1.1K

Hi,

Has anyone tried to call Security.Users class (in %SYS namespace) for creating or editing users from a shell script (or any programming language)?

If yes, can you please share your code?

We are trying to automate some stuff and would like to know how this worked for others.

Thanks,

Bharath Nunepalli.

1 7
0 327
Question
· Apr 7, 2020
CSP Translation

Hi guys,

I have read thos two links how to translate CSP application

https://cedocs.intersystems.com/latest/csp/docbook/DocBook.UI.Page.cls?KEY=GCSP_localization_tags#GCSP_localization_tags_compile

https://cedocs.intersystems.com/latest/csp/docbook/DocBook.UI.Page.cls?KEY=ASTRLOC#ASTRLOC_localization_util_export

I have exported strings to XML

<?xml version="1.0" encoding="UTF-8"?>

<MsgFile Language="sk">

<MsgDomain Domain="webshop">

1 1
0 196

HI,

I have sample %session like this

%session.Data("product", "1") = "Product 1"

%session.Data("product", "2") = "Product 2"

%session.Data("product", "3") = "Product 3"

%session.Data("product", "4") = "Product 4"

%session.Data("product", "5") = "Product 5"

How can i loop in tag based CSP application over %session?

if i have <csp:while condtion=""> Is there something like %session.Data("products").Next() ?

0 1
0 193

Hi,

Kindly find the below example :

If I open google chrome and I add the below link (just an example) , it will download a file to my local PC.

https://www.abc.com/cgi-bin/ocs/pswd=123&rpt=1

pswd correspond to the password

rpt represent the report

How can I do the above using code in cache studio ?

What type of services should I use? what's the parameters ? functions? and how can I test it?

0 4
0 354
Question
· May 12, 2017
Web Sockets

Hi

I am working on a project that will interact with some software called ROS (Robot Operating System). One of the development challenges we have is as follows:

ROS uses web sockets... So one connect with ws://localhost:9090 to the web socket server. It starts off as http, but then "upgrades" to web socket. It then keeps open this "tunnel" for bi-directional communication..

I need something like a HTTP Outbound adapter, but the Web Socket version of it...

Does anyone have any experience in this area?

Nigel

3 14
1 1.2K
Question
· Mar 30, 2020
Error Switching Journal

Hi,

I'm having a problem when I'm attempting to freeze the instance.

I have a pre-script and post-script to freeze and unfreeze the instance, but when the script execute:

 csession INSTANCE_NAME -U '%SYS' "##Class(Backup.General).ExternalFreeze(\"$SNAPLOG\",,,,,,1800)"

It's give me this error and fails the freeze:

Backup.General.ExternalFreeze: Failed, Unable to switch local journal file, Error: -99,ERROR #1142: Error switching journal file: 0
vi

At cconsole.log file show this:

0 4
0 513

A customer is using Caché online backups and needs to automatically purge the cbk files with a scheduled task.

This is a wheel has been reinvented uncountable times already and I know somebody out there has a well written, extremely robust version that has already stood the test of time.

Does anyone have a nice routine/class/task for purging old Caché backup files?

0 10
1 1.5K

The intersystems documentation gives the same description for both <MAXSTRING> and <NETWORK DATA UPDATE FAILED - MAXSTRING>. I suspect that the description for <MAXSTRING> is correct and the description for <NETWORK DATA UPDATE FAILED - MAXSTRING> was an accident. I would like to know what situation triggers the <NETWORK DATA UPDATE FAILED - MAXSTRING> error.

0 2
0 400

I want to create a CSP page that returns a pdf.
The pdf is identified by a pdftoken parameter.

My goal is to validate the token and return the pdf (ContentType=”application/pdf”) if the token
is good and return a text error message "Bad Token" (ContentType=”text/plain”) if the token is missing or bad.

My issue seems to be associated with ContentType. I can define one ContentType that works for the pdf or the error message.
I am unable to change the ContentType.

Any assistance is appreciated.

1 2
1 332
Question
· Mar 26, 2020
Merge two lists?

Hello,

We are developing a method to take two messages which have a list of data types. It is being defined as:

Class Mensajes.Response.HistoriaClinica.ConsultaCitasResponse Extends Ens.Response [ ProcedureBlock ]
{

0 1
0 578

Hello,

We are developing a Transformation and we are wondering: how could we debug and show a XML message which is being an output from a transformation, without storing it into request/response/callrequest/callresponse? We mean, how could we show a context variable in the production?

For example, let's have a transformation which stores an appointment in a variable called: context.especializadasConFormatoPrimarias

How could we show in the Production?

Currently it is being stored as the Transformation's output:

0 1
0 205