Closed kandukurivarun closed 2 weeks ago
Try with all uppercase:
const deviceTypeClass = await conn.getDbObjectClass("TEST.PKG_TRACE_LOOP.DEVICES");
The lookup is case sensitive and in most cases package names and the like are not quoted when they are created, so they are converted to all upper case.
@anthony-tuininga Thank you for the response. I was able to solve the issue with the suggestion you provided and I am now having issue with translating the below SQL block into my oracledb package binds
DECLARE Devices1 SCHEMA_NAME.PKG_TRACE_LOOP.devices :=SCHEMA_NAME.PKG_TRACE_LOOP.devices(); OPEN_Devices SCHEMA_NAME.PKG_TRACE_LOOP.devices :=SCHEMA_NAME.PKG_TRACE_LOOP.devices(); BEGIN SCHEMA_NAME.PKG_TRACE_LOOP.SP_TRACE_LOOP(180642903, Devices1, OPEN_Devices); END;
I want to access the values of Devices1
and OPEN_Devices
back in my JS code.
@anthony-tuininga Thank you for the response. I was able to solve the issue with the suggestion you provided and I am now having issue with translating the below SQL block into my oracledb package binds
DECLARE Devices1 SCHEMA_NAME.PKG_TRACE_LOOP.devices :=SCHEMA_NAME.PKG_TRACE_LOOP.devices(); OPEN_Devices SCHEMA_NAME.PKG_TRACE_LOOP.devices :=SCHEMA_NAME.PKG_TRACE_LOOP.devices(); BEGIN SCHEMA_NAME.PKG_TRACE_LOOP.SP_TRACE_LOOP(180642903, Devices1, OPEN_Devices); END;
I want to access the values of
Devices1
andOPEN_Devices
back in my JS code.
Able to solve the above issue. Thanks for looking into it though.
Node OracleDB Version: 6.5.1 Oracle Database version: 19c
I have created a package on my DB manually using the below snippet
`CREATE OR REPLACE PACKAGE test.pkg_trace_loop AS TYPE devices IS TABLE OF NUMBER (10,0);
END;`
In above snippet
test
is the schama/user name and thepkg_trace_loop
is the package name. Now I want to reference the custom Typedevices
in my NodeJS snippet. For this I have used the below code:let deviceTypeClass = await conn.getDbObjectClass("test.pkg_trace_loop.devices"); let deviceClass = new deviceTypeClass(Number);
I am receiving the error mentioned below with the above syntax:
Error: NJS-129: invalid object type name: "test.pkg_trace_loop.devices"
I tried removing the schema name as well but it returns the same error.
I couldnt find much examples of how I can get working. Any pointers to the solution or the issue are appreciated