Hi,

I want to access a Stored Procedure in a remote SQL Server Database. I am quite new to Object script.

The stored procedure has 3 parameters: 2 datetime parameters and 1 integer.

Which is the best way to do that? I'm wondering if I can use the link stored procedure feature inside object script or some SQL statement in Object Script.

This SP returns a set of rows which I want to read, transform and save in a persistent class.

Thanks in advance,

0 18
0 2K

I want to have a script that can run from the usual unix, linux, or aix command line. It has to be able to get into an irissession and use set statements to get data using sql. It seems like I'm in a catch-22. When I use the irissession SERVER command at the command line, I can't run a script. When I put the irissession SERVER command in a script, it won't run anything in the script after that.

My goal for this script is to get this information and put it into a file which I can then parse.

0 10
0 1.6K

I have a PDF ZEN report module that I'm using XslFoXslt to highlight the table cell.

What I need is for a particular value to add a background image to the <item> that is calling the XSLFoXslt

The code I have is the following but all that happens is the color.

0 7
0 1.2K

Hi,

I try SFTP connect by ObjectScript.
But occurred this error. Can't connect by SFTP key-pair authentication.

:ERROR #7510: SSH Error '-18': SSH Error [80101012]: Username/PublicKey combination invalid [80101012] at Session.cpp:458,0

Key pair was generate this way.
ssh-keygen -m pem -f ~/.ssh/id_rsa
"id_rsa" and "id_rsa.pub" is generated.
Passphrase is empty.

sftp command is connect successful.
ex.
sftp -i .ssh/id_rsa sftpuser@localhost

0 8
0 1.2K

Is it a good practice to set the MAXLEN value of %Library.String property type? Will it lead to wasted storage if its not really using it?

For example, I have to store a 5 characters long string into the below str field. Which of the statement is recommended?

Property str As %String;

vs

Property str As %String(MAXLEN="5");

0 2
0 1.2K

Is there a straightforward workflow in VS Code for moving a class from one namespace to another on the same server? With Caché/IRIS Studio, it was a (sort of) simple export/change namespace in file menu/import operation. But in VS Code it's not obvious (to me, at least).

I can add multiple namespaces to a workspace, but when using isfs:// paths I see only a "Download" option and no "Upload" or "Import/Compile." When I'm navigating the local file tree, I see Import options, but no way to select the namespace into which I want to import.

1 8
0 1.1K
Question
· Apr 25, 2022
Run multiple Update sql queries

Hi everyone, how do you run multiple quires?

I have tried couple of different ways, but not working.

SET sql = 2

Set sql(1) = "UPDATE QUERY"

Set sql(2) = "UPDATE QUERY"

Set sqlStatement=##class(%SQL.Statement).%New()

Set sc1=sqlStatement.%Prepare(.sql)

If $$$ISOK(sc1) {

Set tResult = sqlStatement.%Execute()

}

else{

$$$LOGERROR("Failed")

}

0 4
0 1.1K
Question
· Apr 11, 2022
MAXSTRING limit issue

MAXSTRING (longstring) is enabled.

We have a Class containing a property definition

Property SettingsJSON As %Text(MAXLEN = 3600000)

The property is used for storing a string of JSON data however in some cases we get a Cache error: %SaveData error when trying to save a string of JSON a lot less than maximum "allowed" length, any ideas anyone?

0 14
0 1K

I'm attempting to configure VS Code's InterSystems Server Manager to establish a connection to an IRIS for Health server. It has a standalone CSP gateway running on an Apache server with TLS enabled. The port for all IRIS api and browser traffic is 443.

I've configured the webServer section's host, port, and variations on pathPrefix (including no pathPrefix entry), and have the correct user ID set. The password is stored in the server keychain.

The connection simply fails with "Server could not be reached." Nothing in the Output or Problems tabs.

3 5
1 953

Good Afternoon My InterSystems IRIS Peers,

I have the following issue that I need help with, I tried all possibilities that I know of, therefore I am reaching out to the community for some insight.

I have a SFTP service that pulling 2.5.1 DFT HL7 messages from our SFTP file server. The issue is that IRIS is transforming patients names and addresses that contain special chars UTF-8 to ANSI.

Examples:

è = è
é = é
í = í- .......etc

0 7
0 934

Hi all.

I'm currently looking at a use case where I need to take a Stream, and then encode the contents as a Base64 Stream. This is currently achieved with a snippet of code that has previously been placed in multiple classes within this particular environment, and relied on the dotnet gateway (which suffers with a bug in 2022.1, corrected 2022.1.1).

0 4
0 904
Question
· Feb 1, 2022
VSCode: Formatter not found

Hi,

I am using VSCode together with IRIS 2021.1.
When using Shift+Alt+F to reformat a class file, it pops up with the below message. When I select install formatter, it routes me to the extensions page, where it shows the extensions as being installed. Any advice will be appreciated.

0 8
0 805

I have defined a class with a dynamic object property:

My class

The issue I encounter is that if a length of a serialized json property is more than 3641144 symbols, the object fails to save with the following error (either MAXSTRING or STRINGSTACK):

Length: 100 Result: OK
Length: 3641143 Result: OK
Length: 3641144 Result: OK
Length: 3641145 Result: ERROR #5002: ObjectScript error: <MAXSTRING>%GetSerial+1^%Library.DynamicAbstractObject.1
Length: 7282288 Result: ERROR #5002: ObjectScript error: <STRINGSTACK>%GetSerial+1^%Library.DynamicAbstractObject.1

Is there a workaround? I need to store moderately large jsons (10-15 Mb) and dynamic object properties allow for a very convenient access.

$ZSTORAGE is set to -1.

2 6
0 775