₦airaland Forum

Welcome, Guest: RegisterLoginWith GoogleTrendingRecentNew

Stats: 3,325,603 members, 8,422,769 topics. Date: Monday, 08 June 2026 at 07:08 PM

Toggle theme

Chintuk's Posts

Nairaland ForumChintuk's ProfileChintuk's Posts

1 (of 1 pages)

ProgrammingCan I Use Cyberark Credential Provider To Pull DB Credentials On Npoco Autogener by chintuk(op): 7:52am On Jun 07, 2023
I have an old project where the database class was automatically generated by the NPoco T4 Template. Now I want to use the [url]Cyberark[/url]https://hkrtrainings.com/cyberark-training
credentials provider to store and provide the database credentials. I would like to retain the NPoco file and get the credentials as needed using Cyberark.


Are there any drawbacks to this implementation and would editing the generated autogenerated file break the application? If you have solved this problem before kindly provide pointers.
Science/TechnologyDbms_sql.native And Bulk Collect by chintuk(op): 1:33pm On Apr 27, 2023
Is it possible to select from table of objects while using dbms_sql.native? I have defined an object:

CREATE OR REPLACE TYPE SI_O IS OBJECT(
S_ID NUMBER,
P_ID NUMBER,
G_ID NUMBER,
DLT VARCHAR2(255),
ERROR_ID NUMBER,
B_ID NUMBER
);
I also defined a table of objects:

create or replace type SI_T is table of si_o;
Now I'm trying to use it in a procedure like that:

CREATE OR REPLACE PROCEDURE NATIVE_TEST IS
sqlCommand VARCHAR2(320);
tRows SI_T;
num BINARY_INTEGER:= -1;
l_ntt_desc_tab DBMS_SQL.DESC_TAB;
cur INTEGER;
cnt INTEGER;
nrowCnt INTEGER;

BEGIN

sqlCommand :=
' SELECT SI_O(S_ID, P_ID, G_ID, DLT, error_id,B_ID) FROM MYTABLE' ;

EXECUTE IMMEDIATE sqlCommand BULK COLLECT INTO tRows ;
sqlCommand := 'select count(*) cou from table(tRows)';
-- here is what I wish:
cur := DBMS_SQL.OPEN_CURSOR;

DBMS_SQL.PARSE(cur,sqlCommand,dbms_sql.native);
nrowCnt:=DBMS_SQL.EXECUTE(cur);
DBMS_SQL.CLOSE_CURSOR(cur);
END NATIVE_TEST;
However I'm getting runtime exception ora-00904 "TROWS" invalid identifier. Everything is here simplified but I really wish to use dbms_sql.native like that ( if it would be posiible).

1 (of 1 pages)