InterSystems Developer Community is a community of 17,535 amazing developers
We're a place where InterSystems IRIS programmers learn and share, stay up-to-date, grow together and have fun!

I want to INSERT a record in a database using JDBC in OBJECTSCRIPT. At the same time, I want to obtain the insert ID. Is there a way to achieve this using the SQL Outbound adapter?

My code is something like this now:


Property Adapter As EnsLib.SQL.OutboundAdapter;

set sql = " INSERT INTO Prenotazioni_CUP "_
" (ID, cf
" VALUES (SEQTAB.NextVal, ?) "
set status = ..Adapter.ExecuteUpdate(.rs, sql, pRequest.cfAssistito)

0 5
0 347

Hello,

I don't know if the title is accurate enough. I have a legacy code that I need to optimize. It's a routine written in objectscript. It accepts 4 parameters and runs 6 nested FOR...$ORDER reading a big global.

The thing is when I run the routine the first time it takes around 60 seconds to run. If I run it again it takes 5 seconds. If I wait around 6 to 10 minutes to run it again, it takes 60 seconds again, but if I run it every 1, 2, 3... minutes it still takes only 5 seconds to run.

0 9
0 392

Hello, Complete novice here.

For some reason one of my productions can't be stopped, it only goes to the suspended state. This is an issue because now I'm not able to start any of my other productions. How can I force the suspended production to stop? I have tried Do ##class(Ens.Director).StopProduction() in the terminal, but I get an error the class doesn't exist.

How can I fix this issue?

0 4
0 624

Hello community,

It would be appreciated if you could read and respond to us:

➡️ We need to activate a SOAP Operation during a time slot, in order to send messages to the target system, only for a few hours; for example from 4am to 8am.

The requirement is to do this without a scheduled task. This is because when changing nodes, in the production mirrors, there are difficulties, challenges, or issues with scheduled tasks.

0 2
0 183

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

Hey everyone.

I was wondering if anyone had come across a way of reformatting ObjectScript within VSCode.

I have the various Intersystems Extensions installed (InterSystems Language Pack, InterSystems ObjectScript, InterSystems ObjectScript Extension Pack, InterSystems Server Manager) but a formatter does not seem to be something included within this variety of extensions.

0 16
0 478

Hi community!

I want to introduce you a new powerful feature from our static code analyzer objectscriptQuality.

Each time a new IRIS version is released, you need to prepare a roadmap for migration in which you need to spend a lot of time on testing to find where your code is not accomplishing with the newer version. Or maybe you need your code to be compatible with multiple IRIS or Caché versions.

8 1
1 387

Hi

We have ODBC 32bit Encryption working on our database with a SSLDEFs.ini file. However 64 bit ODBC Encryption will not work and give generic error, same error if the ini file is not there for 32BIT.

We have copied the ini file to the 64bit folder? Any ideas please?

thanks

0 2
0 284

I am receiving the following error in my buisness operation:

ERROR <Ens>ErrException: <UNDEFINED>zGo2+181^mb.MbMainOperation.1 *tSC -- - registered as '-' number - @' set pResponse = ##class(mb.MbMessageResponse).%New()'

From what I understand, the problem occurs in the generated int file mb.MbMainOperation.1 in the method zGo2, with the offset of 181 lines, and the variable in question is a local variable tSC.

However, the line where the error occurs does not refer to tSC in any way

0 3
0 186

I need to execute multiple DELETE statements in a single query like this

DELETE FROM TableName WHERE ID = 2;
DELETE FROM TableName WHERE ID = 3;
DELETE FROM TableName WHERE ID = 4;

However It does not work when there're more than 2 statements and gives me an error

Expected FROM found WHERE^DELETE FROM TableName WHERE

Using IN is not an option.

0 9
0 327

Memorial Sloan Kettering Cancer Center — the world’s oldest and largest private cancer center — has devoted more than 135 years to exceptional patient care, innovative research, and outstanding educational programs. Today, we are one of 51 National Cancer Institute–designated Comprehensive Cancer Centers, with state-of-the-art science flourishing side by side with clinical studies and treatment.

1 0
0 269

We're hosting our Deltanji and Serenji user group session tomorrow - there's still time to register, if you haven't already.

We'll be showcasing some advanced features of Deltanji and Serenji in VS Code with time for a discussion - so feel free to bring along any problems you need help solving or share your feedback on our tools. We'd love to hear your thoughts. If you're interested in our tools this is a great chance to hear what others have to say, as well as asking your own questions.

Date: Wednesday, November 3rd

Time: 11-12pm EDT / 3-4pm GMT.

Let us know you'll be attending on Eventbrite.

We hope to see you tomorrow, but if you're unable to make it you can email me at laurelj@georgejames.com and I can share a recording of the session.

0 0
0 122
Question
· Nov 1, 2021
Globals export exclusion

Hello everyone,
I'd like to export Ensemble globals, but without Ensemble messages, this way:

^^database>s list("Ens*.gbl,'Ens.Message*.gbl")=""
^^database>write $SYSTEM.OBJ.Export(.list, "/tmp/globals.xml")

Documentation says that it could be done by adding an apostrophe, but it doesn't work for me - all Ens* globals are still exported.
What I'm doing wrong? Thanks!

0 9
0 203

I am relatively new to Intersystems cache database management. As I understand it, a database is set with a maximum size or unlimited and the size of each space allocation for the database is defined. My understanding is that the cache database will then manage the allotment of space to the database as the current space allocation is consumed. Though I do not know why one would want to do this, I have been told that the space allocation to a database can be set to be handled manually. This is something, if true, I was not aware of.

0 6
0 203
Question
· Oct 26, 2021
Parse ACK msgs sample

Hello - basic question. Looking for sample code to parse inbound ACK messages. Messages are coming in a SOAP envelope. The ACKs will have MSH/MSA/ERR segments (other segments for QBP messages down the road). Looking at common, established way(s) to parse the messages HS would be a great help to get started on this. Thanks in advance.

0 2
0 192