6 Followers · 157 Posts

Java Database Connectivity (JDBC) is an application programming interface (API) for the programming language Java, which defines how a client may access a database.

Currently could be downloaded from here.

Article Jean Millette · Nov 5, 2021 2m read

One of our apps uses a class query to support a ZEN Report and works just fine in that report, producing the expected results every time. We’ve since migrated to InterSystems Reports and noticed that, for a report using the same class query, 100s of extra rows with the same column values appear at its bottom.

We eliminated InterSystems Reports as the source of the problem by recreating the same “extra rows” issue with an Excel spreadsheet calling the same class query as a stored procedure.

What was the issue?

0
1 374
Question Nicola Sartore · Nov 4, 2021

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)

5
0 548
Question David.Satorres6134 · Aug 11, 2020

Hello all,

I'm trying to setup the JDBC Gateway Server so customers can connect to IRIS remotely using JDBC and not ODBC. But I'm facing a problem connecting, as our system department tells me IRIS is using the loopback address (127.0.0.1) and that makes remote systems cannot connect to port 53773 (the default port for that).

So, I would like to change this 127.0.0.1 host for the hostname but I cannot see where to do it:

Anyone with experience here to help me? :-)

Thanks a lot

15
0 2057
Question Scott Roth · Oct 21, 2021

Once a week we are attempting to load an XML file from Workday into a MS SQL table using JDBC and Store Procedures.There is approx 102999 records in this XML file.We are struggling with processing the entire file within a reason amount of time.We feed the XML through a BPL to then populate values in a stored procedure then call the stored procedure through a Business Operation.I have tried splitting out the Business Operations to make two calls, but we still continue to see an issue loading the XML into MS SQL.

4
0 452
Question Preston Exley · May 27, 2021

I'm using a JDBC driver to connect PGSQL -> Cache.  I'm noticing when I run SELECT queries and COUNT(*) command against the same table, I get different result sets.  I'm pretty new to Cache in general - so I'm trying to understand why these would be different. 

Examples (TransID and InvNum should occur in every "row"):

SELECT COUNT(*) FROM ACCT.Services = 1,090,324 WHERE ACCT.Dept = 483

SELECT TransID FROM ACCT.Services = 1,085,776 WHERE ACCT.Dept = 483

SELECT InvNum FROM ACCT.Services = 586,023 WHERE ACCT.Dept = 483

(I tried the same thing in MSSQL via  LinkedServer and it unsurprisingly yielded

8
0 348
Article Zhong Li · Jul 18, 2020 7m read

Keyword: Pandas DataFrame, IRIS, Python, JDBC

Purpose

Pandas DataFrame is popular tool for EDA (Exploratory Data Analysis). In ML tasks, the first thing we usually perform is to understand the data a bit more. Last week I was trying this Covid19 dataset in Kaggle. Basically the data is a spreadsheet of 1925 encounter rows with 231 columns, and the task is simply to predict whether a patient (linked to  1 or more encounter records) would be admitted to ICU. So it's a normal classification task, and we would as usual use padas.DataFrame to take a quick look first.  

We have IRIS IntegrtedML now,

3
1 1136
Question Jairton Junior · Feb 19, 2021

When using "IDENTITY" as my primary key, I can select the last inserted ID with 

SELECT LAST_IDENTITY() FROM %TSQL_sys.snf;

Actually this is how Hibernate + Iris' Driver acquires the inserted ID when mapping with

@GeneratedValue(strategy = GenerationType.IDENTITY)

 

Now, considering that I am using the type "SERIAL" as my primary key instead, how can I get the last inserted ID?

Note that with "SERIAL" I can forcefully insert any value for this ID, from which Iris will continue generating values...

CREATE TABLE test (
    test_id serial NOT NULL,
    name varchar(100) NULL,
    CONSTRAINT pk_test

1
0 353
Article Botai Zhang · Jan 25, 2021 4m read

Built in multi model integration using InterSystems iris data platform

Solution of hospital information inquiry business

Integration of hospital information query business solutions using InterSystems IRIS data platform with built-in multiple models

### Summary:

With the gradual improvement of hospital information construction, there are more and more hospital subsystems, and more and more interfaces between systems.At the same time, the interface cost is increasing, and the management work is becoming more and more complex.

0
0 370
Article Eduard Lebedyuk · Jan 12, 2021 1m read

DataGrip is a multi-engine database environment targeting the specific needs of professional SQL developers, DataGrip makes working with databases an enjoyable and productive experience.

To work with InterSystems IRIS from DataGrip you'll need to add InterSystems JDBC driver first (once per DataGrip) and after that add all your InterSystems IRIS connections.

Part 1: Add InterSystems IRIS JDBC Driver

1. Go To File → DataSources

2. Go to + → Driver

3. Set Driver properties:

  • Name: InterSystems IRIS
  • Class: com.intersystems.jdbc.IRISDriver
  • Add JDBC Driver file: path to /<IRIS>/dev/java/lib/JDK18/int
0
0 892
Question Scott Roth · Dec 7, 2020

I have a case where I need to look up the NPI provider against an External MS SQL database to retrieve our Provider Identifier to send to a downstream system. In the past I would use a Business Process (BPL) to connect to the outside MS SQL via JDBC and get that information for me. But I was thinking instead of creating a BPL process to do this, would it be better just to link to the outside MS SQL database table to retrieve the information in a SQL statement within a DTL?

So it is better to link to an outside database via a Linked Table wizard?

3
0 389
Article Zhong Li · Jan 27, 2020 7m read

Keywords: Python, JDBC, SQL, IRIS, Jupyter Notebook, Pandas, Numpy, and Machine Learning 

1. Purpose

This is another 5-minute simple note on invoking the IRIS JDBC driver via Python 3 within i.e. a Jupyter Notebook, to read from and write data  into an IRIS database instance via SQL syntax, for demo purpose. 

Last year I touched on a brief note on Python binding into a Cache database (section 4.7) instance.

1
2 3106
Question Kranthi kiran · Nov 6, 2020

Hi Cache team, I am in the need of listing all the user defined schemas that are present my Cache db and also the user defined tables and views and Columns of those tables and views through Queries. So that I can write some JDBC code to run the queries and fetch the above metadata. Any help is appreciated.

Thanks in Advance,

Kranthi kiran.

2
0 2940
Announcement Anastasia Dyubaylo · Oct 5, 2020

Hey Developers!

This week is a voting week for the InterSystems Full Stack Contest!

So, it's time to give your vote to the best solutions built with InterSystems IRIS.

🔥 You decide: VOTING IS HERE 🔥

How to vote? This is easy: you will have one vote, and your vote goes either in Experts Nomination or in Community Nomination.

4
0 522
Announcement Anastasia Dyubaylo · Sep 17, 2020

Hi Community!

We are pleased to invite all the developers to the upcoming InterSystems Full Stack Contest Kick-off Webinar! The topic of this webinar is dedicated to the Full Stack Contest.

On this webinar, we’ll demo the IRIS Full Stack template and answer the questions on how to develop, build and deploy full stack applications in InterSystems IRIS.

Date & Time: Monday, September 21 — 11:00 AM EDT

Speakers:  
🗣 @Evgeny Shvarov, InterSystems Developer Ecosystem Manager
🗣 @Raj Singh, InterSystems Product Manager - Developer Experience

2
0 397
Announcement Guillaume Rongier · Aug 12, 2020

Hello,

Recently I tried to connect to JDBC on IRIS 2020.3+ and I came across the following error:

 SQL Error [461] [08S01]: [InterSystems IRIS JDBC] Communication link failure: Communication error: Server closed communication device

This error implies that the port is not open.

Checking with the netstat command:

irisowner@78c3e30b7f41:/opt/irisapp$ netstat -a
Active Internet connections (servers and established)
Proto Recv-Q Send-Q Local Address Foreign Address State     
tcp 0 0 0 0.0.0.0:1972 0.0.0.0:* LISTEN    
tcp 0 0 127.0.0.11:38005 0.0.0.0.0:* LISTEN    
tcp 0 0 0.0.0.0:52773 0.0.0:*
1
0 1150
Article Yuri Marx · Jun 10, 2020 1m read

Many times it is necessary copy or send files to your docker container instance.

In my case was with IRIS JDBC driver.

Docker has this recipe for this (credits to https://docs.docker.com/engine/reference/commandline/cp/):

docker cp [OPTIONS] CONTAINER:SRC_PATH DEST_PATH|-
docker cp [OPTIONS] SRC_PATH|- CONTAINER:DEST_PATH

But to copy you need your container name. Write this command for this:

docker ps

In my, my-iris is the container name.

If you need to know file location into your docker file system too, write:

1. To go to bash of your docker instance: docker exec -it my-iris /bin/bash.
2.Write cd .

1
3 613
Question Sadagopan Srinivasan · May 31, 2020

Hi Guys,

I am trying to pull data from CacheDB and push into elasticsearch using logstash. In the configuration file i am giving the following. But it is throwing error No Suitable Driver Found for jdbc:Cache://ipaddress:port/namespace. Could anyone please help to resolve this ? I tried both JDK17 and JDK18 but no luck.

My Config file is as follows

input {
    jdbc {
    clean_run => true
    jdbc_driver_library => "C:\InterSystems\Cache\dev\java\lib\JDK17\cache-jdbc-2.0.0.jar"
    jdbc_driver_class => "com.intersys.jdbc.CacheDriver"
    jdbc_connection_string => "jdbc:Cache://Ipaddress:1972/PC61T"
  

6
1 997
Article Marc Mundt · Jun 30, 2016 3m read

The Caché System Management Portal includes a robust web-based SQL query tool, but for some applications it’s more convenient to use a dedicated SQL client installed on a user’s PC.

SQuirreL SQL is a well known open source SQL client built in Java, which uses JDBC to connect to a DBMS. As such, we can configure SQuirreL to connect to Caché using the Caché JDBC driver.

Finding Caché’s JDBC driver JAR

The JAR file containing the Caché JDBC driver is installed automatically by the Caché installer when installing a full Caché instance or when installing client components only.

10
1 11051
Question Jo Ellen Laansma · May 13, 2020

I have a class that writes to an external SQL Server database.  When the field is empty, it does not write the column and the column has the value NULL.  In some cases, I want the column to be the value of the empty stringinstead of NULL.

Class myRequestClass Extends Ens.Request
{

    Property MessageType As %String

}

The message that is passed to this class shows:

    <MessageType></MessageType>

Which writes the field as NULL with:

    tSQL = "insert into myTable (MessageType) values (?)"

    set tSC = ..Adapter.ExecuteUpdate(.tNumberOfRowsUpdated,tSQL,myRequestClass.MessageType)

I've tried setting

5
0 16788
Question Suman Samanta · Feb 12, 2020

HI I am using below code to retrieve the last inserted ID of the table. It works when we do not set any custom column as IDKey. If we define any column as 

IDKey below code does not return any IDKey. I know when i am defining any column as IDKey its not auto generated , but whats the best way to get the ID column value

            String sql = "INSERT INTO TestFramework_UI_Data.Execution (TotalTestSteps) VALUES (0)";
            //ResultSet rs = createExecutionSt.executeQuery("SELECT * FROM TestFramework_E2E_Data_TestData.TestCases");
            int t =

1
0 802
Question Vikram Annadurai · Dec 21, 2019

Hi All,

I trying to get the DisplayList data of the ValueLIst from Java using Springboot. when I try to get the DislayList data via java code but I'm getting the VALUELIST data. I don't get any idea to get that DisplayList data. Below is the example

Property PetName As %Integer(DISPLAYLIST = ",Cat,Dog,Dove,Parrot", VALUELIST = ",1,2,3,4");

Java Code:

public String PetName;

public List<Pet> getPet() {
        return ser.findAll();
    }

List<Pet> arrayList = getPet();
        for (Patient list : arrayList) {

                 String pet= list.getPet();

                 System.out.println("Pet Name --->"

4
0 734
Question Jess Farmer · Mar 6, 2019

I am under the impression that inside HealthShare you can Services, Processes, and Operations. The service takes incoming data, the processes can process that data, and then the operations can send that data out.

I am curious if anyone has any experience, guides, or advice on how I can send data to a service using a Java application. I intend for the data to be in XML format. I am also curious if I succeed at picking up the data in the service, how I send the data back to the Java application using an Operation.

As of now I am attempting to get this to work on a local environment.

Any input

2
0 407
Question Marcio Coelho · Dec 2, 2019

Hi all...

I am try to execute a class method from JDBC connection. My method are simple, just create a file at $HOME  like this:

set sc='$zf(-1,"touch $HOME/lixo.txt > /var/tmp/log666 2>&1")

I put a log file to this commnad because it's don't work, and in log file i get this:

touch: cannot touch ‘/root/lixo.txt’: Permission denied


after to try other commands I found that user and enviromnent  variables are diferents:
I try this:

set sc='$zf(-1,"echo $USER > /var/tmp/log666 2>&1") ;Return root

 

set sc='$zf(-1,"echo $HOME > /var/tmp/log666 2>&1") ;return /root

 

set sc='$zf(-1,"whoami > /var/tmp/log666
8
0 361
Question Matías Peña · Nov 18, 2019

Hi, I asked last week and they gave me some little tips. But the truth is I still can't carry out this "Project".
 

I must perform a REST service, using Oracle 11 database. Eh tried anyway to achieve this.

The purpose is to make a REST service, using the database provided to me and use the procedure that is already created.

According to what I read, I made the connection via JDBC and I had no major problem

Then I managed to read the bd inside iris and capture its procedure, but at the time of doing this. The procedure does not work correctly.

The truth is that I am very complicated with this for

2
0 357
Question Marcio Coelho · Oct 29, 2019

Hi all....

I couldn't find documentation on how to create a blob using the cache JDBC driver.
I found only one reading example:


https://cedocs.intersystems.com/latest/csp/docbook/DocBook.UI.Page.cls?…

The createBlob Method of the connection class was not implemented:

https://cedocs.intersystems.com/latest/csp/docbook/DocBook.UI.Page.cls?…
 

Does anyone know how to create a blob without compromising the java heap space?

7
0 466