Chintuk's Posts
Nairaland Forum › Chintuk's Profile › Chintuk's Posts
1 (of 1 pages)
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. |
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)