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 1K
Question
· Mar 3, 2020
Intersystem jar files

I'm working on developing Productions with java. The sample project has several intersystems jar files:
-- intersystems-enslib-jms-3.1.0.jar
-- intersystems-gateway-3.1.0.jar
-- intersystems-jdbc-3.1.0.jar
-- intersystems-spark-1.0.0.jar
-- intersystems-uima-1.0.0.jar
-- intersystems-utils-3.1.0.jar
-- intersystems-xep-3.1.0.jar

I have the jar files, but where can I find them for download? Are they available on a maven repository somewhere?

Any help would be appreciated!

0 3
0 953

Can anyone clarify to me about the differences between these two classes?

People in this topic https://community.intersystems.com/post/using-class-queries-sqlstatement-versus-libraryresultset stated that %SQL.Statement (I am assuming they mean to talk about %SQL.StatementResult) is newer than %Library.ResultSet. But I don't really know what are the advantages of %SQL.Statement over %Library.ResultSet as the people in the topic somehow didn't mention them.

0 6
0 952

Hello Everyone,

I'm want to know, what is more common for your company to use, the abbreviation syntax or the complety name of commands, and why?

Ex.

S VAR=10 / D FUNC^ROUTINE F 1:1:1000

Set VAR=10 / Do Func^Routine / For 1:1:1000

set var=10 / do func^routine / for 1:1:1000

Here in my company, we are familiar with the abbreviation syntax, because to spell is more faster.

2 35
0 916

Hi guys!

As you know there are two (at least) ways to get the stored value of the property of InterSystems IRIS class if you know the ID of an instance (or a record).

1. Get it by as a property of an instance with "Object access":

ClassMethod GetPropertyForID(stId As %Integer) As %String

{

set obj=..%OpenId(stId)

return obj.StringData

}

2. Get it as a value of a column of the record with "SQL access":

0 18
0 908

I have a workstation with a CACHE instance up and running.

On that same workstation there is also an instance of IRIS (fresh install). I would like to migrate manually the CACHE database to IRIS (ideally, all globals, routines and classes).

What I tried is to copy C:\InterSystems\Cache\mgr\CACHE.DAT to C:\InterSystems\IRIS\mgr\IRIS.DAT (after shutting down both instances) but it does not work.

I got the following message : (112) The service for the IRIS instance did not start.

0 6
2 873

Hi

How do I run a CSP page from within VS Code.

Secondly I have installed an extension called "Live Server" which will run .html pages within VS Code. Have any of you made use of this extension and if so can you specify that .csp pages are html pages?

If I press F5 in VS Code (just as you would in Cache Studio) in order to view a csp page when I press F5 in vs code it tries to open

http://localhost:57772/csp/bootstrap/

without the csp page name

0 6
2 871

Hi guys,

My client has a requirement to add a column of random numbers to the query result.

I wrote a function as below:

Class Utils.SqlUtility Extends %RegisteredObject
{

ClassMethod GetSomeNumber(intInput As %Integer) As %Integer [ SqlName = GetNumber, SqlProc ]
{
Return $R(intInput)
}

}

But in the returned sql result, every row share the same value, as below,

SELECT Utils.GetNumber('456'),
ID, Citizenship, DOB, FirstName, Gender, IDNumber, LastName, PatientNumber, PhoneNumber
FROM CDR.Patient

0 6
0 867

Hi Developers!

A question to those who use VSCode to code InterSystems ObjectScript.

Suppose you have the ObjectScript code on IRIS server and you want to export it into the desired folder.

And you have VSCode connected to the server.

What is the way to tell VSCode that I want to export classes into some particular folder in /package/class.cls way?

E.g. into:

/project_folder/src/cls/Package/class.cls

and project_folder is opened in VSCode as the folder of the project.

1 8
0 864