Call oracle procedure from NT scheduler
How can we call a procedure from NT schedular / Unix schedular ?
Atul
<BLOCKQUOTE><font size="1" face="Verdana, Arial, Helvetica">quote:</font><HR>Originally posted by ATUL SRIVASTAV ([email protected]):
How can we call a procedure from NT schedular / Unix schedular ?
Atul<HR></BLOCKQUOTE>
Hi
You can write SQL*Plus script and put sqlplus in NT scheduler or Unix cron table. The onle problem is that password must present in command line, so you should think how to keep it. Starting of sqlplus can be in .bat file or shell script unvisible for nonauthorized persons.
Regards
null
Similar Messages
-
Problem in calling oracle procedure from java
Oracle procedure with the following parameters.
CREATE OR REPLACE PROCEDURE CREDITED_TO_STORE_INSERT (P_CUST# IN NUMBER,
P_INV_DATE IN DATE,
P_MEMO# IN NUMBER,
P_SESS_ID IN VARCHAR2 ) IS
BEGIN
/*.........Procedure Body with select and insert statements there no OUT or return variable/value......*/
END;
Now i am calling this procedure with the java code in java.
public boolean execProcedure(String storeNo, String invoiceDate, String claimNo, String sessionID) throws SQLException {
CallableStatement cstmt = null;
java.sql.Date invicDate = this.StringToDate(invoiceDate);
try
cstmt = conn.prepareCall("{call WEBUSER.CREDITED_TO_STORE_INSERT(?,?,?,?,?,?)}");
cstmt.setInt(1, Integer.parseInt(storeNo));
cstmt.setDate(2, invicDate);
cstmt.setInt(3, Integer.parseInt(claimNo));
cstmt.setString(4, sessionID);
cstmt.execute();
catch (Exception e)
System.out.println (e);
} // catch (Exception e)
finally
try
cstmt.close();
catch (Exception ex)
} // catch (Exception ex)
} // finally
return true;
But it will return the following exception.
[STDOUT] java.sql.SQLException: Missing IN or OUT parameter at index:: 5
i don't know why :( please help me ...your procedure has 4 parameters but in the prepared statement you define 6 placeholders
-
Calling oracle procedure from ABAP program
There is a requirement to call the oracle stored procedure with some input parameter from ABAP program.
Suppose we have order number which is entered by the user in ABAP program.
This order number needs to be passed to oracle stored procedure as an input parameter in the same ABAP program.
We can call the oracle stored procedure without parameter using the following syntax
exec sql
execute procedure <procedure name>
end exec.
But do not know how to execute the oracle stored procedure with some input parameter?Apologies , following is the correct code.
This will definetly solve your problem.
DATA scarr_carrid TYPE scarr-carrid.
SELECT-OPTIONS s_carrid FOR scarr_carrid NO INTERVALS.
DATA s_carrid_wa LIKE LINE OF s_carrid.
DATA name TYPE c LENGTH 20.
TRY.
EXEC SQL.
CREATE FUNCTION selfunc( input CHAR(3) )
RETURNING char(20);
DEFINE output char(20);
SELECT carrname
INTO output
FROM scarr
WHERE mandt = '000' AND
carrid = input;
RETURN output;
END FUNCTION;
ENDEXEC.
LOOP AT s_carrid INTO s_carrid_wa
WHERE sign = 'I' AND option = 'EQ'.
TRY.
EXEC SQL.
EXECUTE PROCEDURE selfunc( IN :s_carrid_wa-low,
OUT :name )
ENDEXEC.
WRITE: / s_carrid_wa-low, name.
CATCH cx_sy_native_sql_error.
MESSAGE `Error in procedure execution` TYPE 'I'.
ENDTRY.
ENDLOOP.
EXEC SQL.
DROP FUNCTION selfunc;
ENDEXEC.
CATCH cx_sy_native_sql_error.
MESSAGE `Error in procedure handling` TYPE 'I'.
ENDTRY.
Reward points if usefull.
Thanks and regards,
Veerendranath. -
Calling oracle procedure from batch script
i have a .bat file, in which i am using sqlldr to load into a staging table from csv file, and then using merge to insert / update into target table
i have 2 doubts
1) my first doubt is regarding batch script..how to handle the errorlevels which are greater than 1?
so generally speaking, how do i handle all the errors at once..and make sure the control goes to
run_sqlldr0 always? and handle the error meaningfully if its other than 0 ?
below is my batch script, and i get error
goto run_sqlldr2
the system cannot find the batch label specified - run_sqlldr2
@echo on
call oraenv.bat
if not exist %mainpath% goto mainpath_def
if not exist %scripts% goto scriptspath_def
if not exist %logs% goto logspath_def
if not exist %data% goto datapath_def
goto x1
:x1
goto run_sqlldr%ERRORLEVEL%
echo run_sqlldr%ERRORLEVEL%
if run_sqlldr%ERRORLEVEL% NEQ 0 goto run_sqlldr1
echo "entering sqlldr"
:run_sqlldr1
echo "entered sqlldr1"
echo "some error"
echo mergedata%ERRORLEVEL%
:run_sqlldr0
echo "entered sqlldr0"
sqlldr userid = scott/tiger@orcl control=%mainpath%\cm.ctl log=%logs%\cm.log discard=%logs%\cm.dsc bad=%logs%\cm.bad SILENT=(HEADER, FEEDBACK)
goto mergedata%ERRORLEVEL%
:mergedata1
echo "entered mergedata1"
echo cleandata%ERRORLEVEL%
:mergedata0
sqlplus -s scott/tiger@orcl @%scripts%\merge_stg.sql
goto cleandata%ERRORLEVEL%
:cleandata1
echo "entered cleandata1"
sqlplus -s scott/tiger@orcl @%scripts%\clean_stg.sql
goto exit
:cleandata0
echo "entered cleandata0"
echo "error in removing data"
goto exit
:mainpath_def
echo "mainpath not existing as specified %mainpath%, Please edit ORAENV with correct value"
goto exit
:scriptspath_def
echo "scripts path not existing as specified %scripts%, Please edit ORAENV with correct value"
goto exit
:logspath_def
echo "Logs path not existing as specified %logs%, Please edit ORAENV with correct value"
goto exit
:datapath_def
echo "Data path not existing as specified %data%, Please edit ORAENV with correct value"
goto exit
:exit
2) my second doubt, is this the right way of calling the stored procedures merge_stg and clean_stg?
in clean_stg, i use dynamic sql to truncate the staging table
create or replace procedure trunstg is
lsql varchar2(2000) := 'truncate table stg_ldrtest';
begin
execute immediate lsql;
end;
/i have changed the code
@echo on
call oraenv.bat
if not exist %mainpath% goto mainpath_def
if not exist %scripts% goto scriptspath_def
if not exist %logs% goto logspath_def
if not exist %data% goto datapath_def
goto x1
:x1
goto run_sqlldr%ERRORLEVEL%
echo run_sqlldr errorlevel: %ERRORLEVEL%
if run_sqlldr%ERRORLEVEL% NEQ 0 goto run_sqlldr1
echo "entering sqlldr"
:run_sqlldr1
echo "entered sqlldr1"
echo "some error"
:run_sqlldr2
echo errorlevel: %errorlevel%
echo mergedata%ERRORLEVEL%
:run_sqlldr0
echo "entered sqlldr0"
sqlldr userid = gautam/gautam@orcl control=%mainpath%\cm.ctl log=%logs%\cm.log discard=%logs%\cm.dsc bad=%logs%\cm.bad SILENT=(HEADER, FEEDBACK)
goto mergedata%ERRORLEVEL%
:mergedata1
echo "entered mergedata1"
goto end
echo cleandata%ERRORLEVEL%
:mergedata0
sqlplus -s gautam/gautam@orcl @%scripts%\merge_stg.sql
goto cleandata%ERRORLEVEL%
:cleandata1
echo "entered cleandata1"
echo "cleaning error"
goto end
:cleandata0
sqlplus -s gautam/gautam@orcl @%scripts%\clean_stg.sql
goto end
:mainpath_def
echo "mainpath not existing as specified %mainpath%, Please edit ORAENV with correct value"
goto exit
:scriptspath_def
echo "scripts path not existing as specified %scripts%, Please edit ORAENV with correct value"
goto exit
:logspath_def
echo "Logs path not existing as specified %logs%, Please edit ORAENV with correct value"
goto exit
:datapath_def
echo "Data path not existing as specified %data%, Please edit ORAENV with correct value"
goto exit
:end
EXIT
so the error is ORA - 30926, unable to get a stable set of
rows in the source tables
my merge is
MERGE INTO ldrtest D
USING (SELECT code,id,row_name,col1,col2,col3,crt_tm,md_tm,crt_user,mod_usr FROM stg_ldrtest) S
ON (d.code = s.code and d.id = s.id and d.row_name=s.row_name )
WHEN MATCHED THEN UPDATE SET d.col1 = s.col1,
d.col2 = s.col2,
d.col3 = s.col3,
d.crt_tm = s.crt_tm,
d.md_tm = s.md_tm,
d.crt_user = s.crt_user,
d.mod_usr = s.mod_usr
WHEN NOT MATCHED THEN INSERT (d.code,d.id,d.row_name,d.col1,d.col2,d.col3,d.crt_tm,d.md_tm,d.crt_user,d.mod_usr)
VALUES (s.code,s.id,S.row_name, s.col1,s.col2,s.col3,s.crt_tm,s.md_tm,s.crt_user,s.mod_usr);
i did not understand what this error means..
could anyone please help me out -
How to call oracle procedure from vb
i created a procedure in oracle8.1.7 to return on value,look the following script:
Procedure P_COUNT (r out number)
IS
BEGIN
select count(*) into r from demo;
END;
but i can get the value from VB,i display some errors:
ORA-06502 PL/SQL: numeric or value errorstring
ORA-06512 at stringline string
what can i do now?
nullHei Zhang,
Thank You. You can return Cursor in many ways. You can write either a function to return cursor (return type is %ROWTYPE) or a package. Writing a Package seems laborious but I like it as it has lot of flexibility.
I will give you the example for the second type:
-- 1) Create a Package first:
CREATE OR REPLACE PACKAGE pk_MyPackage AS Type RT1 IS RECORD (
sp_ename emp.ename%TYPE,
sp_job emp.job%TYPE,
sp_mgr emp.mgr%TYPE
TYPE RCT1 IS REF CURSOR RETURN RT1;
END;
sho err
-- 2) Create a Procedure:
CREATE OR REPLACE PROCEDURE sp_MyProcedure (
in_empno emp.empno%TYPE,
RC1 IN OUT pk_MyPackage.RCT1
) AS
BEGIN
OPEN RC1 FOR
SELECT ename,
job,
mgr
FROM emp
WHERE empno = in_empno;
RETURN;
END;
sho err
--Testing
SQL> var cr refcursor
SQL> exec sp_MyProcedure (7934, :cr)
PL/SQL procedure successfully completed.
SQL> print cr
ENAME JOB MGR
MILLER CLERK 7782
Hope this is clear and helps you to complete your task.
Cheers!
r@m@ -
Calling Stored Procedure from Oracle DataBase using Sender JDBC (JDBC-JMS)
Hi All,
We have requirement to move the data from Database to Queue (Interface Flow: JDBC -> JMS).
Database is Oracle.
*Based on Event, data will be triggered into two tables: XX & YY. This event occurs twice daily.
Take one field: 'aa' in XX and compare it with the field: 'pp' in YY.
If both are equal, then
if the field: 'qq' in YY table equals to "Add" then take the data from the view table: 'Add_View'.
else if the field: 'qq' in YY table equals to "Modify" then take the data from the view table: 'Modify_View'.
Finally, We need to archive the selected data from the respective view table.*
From each table, data will come differently, means with different field names.
I thought of call Stored Procedure from Sender JDBC Adapter for the above requirement.
But I heard that, we cannot call stored procedure in Oracle through Sender JDBC as it returns Cursor instead of ResultSet.
Is there any way other than Stored Procedure?
How to handle Data Types as data is coming from two different tables?
Can we create one data type for two tables?
Is BPM required for this to collect data from two different tables?
Can somebody guide me on how to handle this?
Waiting eagerly for help which will be rewarded.
Thanks and Regards,
Jyothirmayi.Hi Gopal,
Thank you for your reply.
>Is there any way other than Stored Procedure?
Can you try configuring sender adapter to poll the data in intervals. You can configure Automatic TIme planning (ATP) in the sender jdbc channel.
I need to select the data from different tables based on some conditions. Let me simplify that.
Suppose Table1 contains 'n' no of rows. For each row, I need to test two conditions where only one condition will be satisfied. If 1st condition is satisfied, then data needs to be taken from Table2 else data needs to be taken from Table3.
How can we meet this by configuring sender adapter with ATP?
================================================================================================
>How to handle Data Types as data is coming from two different tables?
If you use join query in the select statement field of the channel then whatever you need select fields will be returned. This might be fields of two tables. your datatype fields are combination of two diff table.
we need to take data only from one table at a time. It is not join of two tables.
================================================================================================
Thanks,
Jyothirmayi. -
Error when calling a procedure from my apex application
Hello.
I want to create a small APEX application that can configure asynchronous change data capture (distributed hotlog) on certain tables.
Basically, what the application should do is to simply create change tables. Everything else is set up as prerequisite.
My problem is that when I run the following script from schema apex_cdd (using sqldeveloper) , it works; but if I run it from my apex application by calling it when pressing a button as a pl/sql process, it doen't work.
BEGIN
apex_cdc.enable_table_capture
( i_owner => 'staging_cdcpub',
i_change_table_name => 'g_changeTable',
i_change_set_name => 'Source_changeSet',
i_change_source => 'orcl01_cs',
i_source_schema => 'My_src',
i_source_table => 'G',
i_column_type_list => 'STARTDATE DATE,STATUS CHAR(1),NAME VARCHAR2(10),ENDDATE DATE,DESCRIPTION VARCHAR2(255),ID NUMBER(8,0),VALUE NUMBER(10,2)'
END;
If I look in the trace file, i see that the error is:
CDCdebug:in ChangeTable.java enableDisabledTriggers: ORA-06550: line 1, column 8:
PLS-00201: identifier 'SYS.DBMS_CDC_SYS_IPUBLISH' must be declared
ORA-06550: line 1, column 8:
PL/SQL: Statement ignored
oracle.jdbc.driver.OracleSQLException: ORA-06550: line 1, column 8:
PLS-00201: identifier 'SYS.DBMS_CDC_SYS_IPUBLISH' must be declared
ORA-06550: line 1, column 8:
PL/SQL: Statement ignored
Other remarks:
- My procedure calls: sys.DBMS_CDC_PUBLISH.CREATE_CHANGE_TABLE.
- I gave the same rights that I gave for apex_cdc schema to flows_030200 and APEX_PUBLIC_USER schemas (just to see if it works), but it doens't.
Is APEX calling the procedure from another schema ?
Does anyone has an idea why this procedure crashes if called from APEX application, but works ok if called from the same schema APEX application runs on, but using SQLDeveloper ?
Any thoughts are appreciated.
RadianThe procedure apex_cdc.enable_table_capture i created myself with no authid mentioned explicitly, so it uses definer rights, by default.
BUt this procedure is simply a wrapper for sys.dbms_cdc_publish.create_change_table.
When I look on the security model for this sys.dbms_cdc_publish, i see it runs under invoker rights. (http://www.psoug.org/reference/dbms_cdc_publish.html).
The code is like this:
CREATE OR REPLACE PROCEDURE enable_table_capture
i_owner IN VARCHAR2,
i_change_table_name IN VARCHAR2,
i_change_set_name IN VARCHAR2,
i_change_source IN VARCHAR2,
i_source_schema IN VARCHAR2,
i_source_table IN VARCHAR2,
i_column_type_list IN VARCHAR2
IS
BEGIN
EXECUTE IMMEDIATE 'alter session set REMOTE_DEPENDENCIES_MODE=SIGNATURE';
EXECUTE IMMEDIATE 'begin add_log@orcl01(i_tableName => ''G''); end;';
sys.DBMS_CDC_PUBLISH.CREATE_CHANGE_TABLE(
owner => i_owner,
change_table_name => i_change_table_name,
change_set_name => i_change_set_name,
source_schema => i_source_schema,
source_table => i_source_table,
column_type_list => i_column_type_list,
capture_values => 'both',
rs_id => 'y',
row_id => 'n',
user_id => 'n',
timestamp => 'y',
object_id => 'n',
source_colmap => 'n',
target_colmap => 'y',
options_string => NULL);
END enable_table_capture; -
Calling a procedure from Dynamic Page
I am trying to call a procedure from a dynamic page. The procedure displays multi records from a table. I have created a procedure:
PROCEDURE process_student_request( p_primary_request in wwv_utl_api_types.vc_arr,
p_alternate_request in wwv_utl_api_types.vc_arr,
p_action in varchar2,
l_status in out varchar2);
When I hit the submit button on the dynamic page it does not execute the procedure and tries to open a new page. How do I get this to work?
Here is the text of the page:
<HTML>
<HEAD>
<TITLE>Example</TITLE>
</HEAD>
<BODY>
<FORM action="portal30.star_portal.process_student_requests" method="post">
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="2" CELLSPACING="0" class="RegionBorder">
<TR>
<TD valign="top" align="left" width="40%"><FONT class="PortletText1">
<ORACLE>declare
row_num number := 1;
hold_row_num number;
hold_class_cd stars3.req.class_cd%TYPE;
begin
for c1 in (select A.start_yy, A.school, A.student_id, A.class_cd, B.name from stars3.course B, stars3.req A
where A.student_id = portal30.star_portal.get_session_variable('STUDENT_ID') and A.start_yy = '01' and
A.alternate_no = '0' and
B.start_yy = A.start_yy and
B.school = A.school and
B.class_cd = A.class_cd)
loop
hold_class_cd := c1.class_cd;
htp.p(lpad(to_char(row_num),2,'0'));
htp.p('<select name="p_primary_request">');
htp.p('<option value="' || c1.class_cd|| '">' || c1.name || '</option>');
row_num := row_num + 1;
htp.p('<BR>');
end loop;
htp.p('<input type="submit" name="p_action">');
end;
</ORACLE>
</BODY>
</FORM>
</TD>
</TR>
</TABLE>
</HTML>Bob,
You have variables in your procedure like l_status, p_alternate_status which you do not have in the form. Are these IN or OUT variables ?
If these are IN variables, this proc will not work because you do not have any variable in the form. So from where does it get the values? There is not any default declared too. You have to explicitly define IN or OUT variables.
Have you also given execute permission to public ? -
Hi,
I am getting the following error while trying to call a procedure from AM. I have check and all the parameters are being passed correctly. Not sure why this is throwing error. Below is the error message.
oracle.apps.fnd.framework.OAException: java.sql.SQLException: ORA-06550: line 1, column 7:
PLS-00306: wrong number or types of arguments in call to 'AbcPositionDetails'
ORA-06550: line 1, column 7:
PL/SQL: Statement ignored
Any help is appreciated.
Thanks in advance
PKYou will get this error when you pass wrong number of arguments to a pl/sql procedure.
use named parameter binding like proc(a=>'value') to avoid this error.
--Prasanna -
Calling a Procedure from a Button? (REVISITED)
Hi All,
I once asked a question Re: Calling a Procedure from a Button? & that problem was resolved when i was working on the online ApEx.
On my application, requirements have changed a bit: I have one form based on two tables. One table contributes two fields (name & surname) to the form while the remaining fields are contributed by another table to make a total of 17 fields on the form.
My process is in such a way that a user enters an id number & clicks Search button, if the apllicant exists then both name & surname corresponding with the id number will be retrieved from the database. If the applicant does not exist then an error message will be displayed inline with the id number field. Here's the PL/SQL anonymous block to that:
DECLARE
vNAME APPLICANTS.name%TYPE;
vSURNAME APPLICANTS.surname%TYPE;
BEGIN
SELECT count(*)
INTO :P2_COUNT
FROM applicants
WHERE id_number = :P2_ID_NUMBER;
IF :P2_COUNT > 0 THEN
SELECT name,surname
INTO vNAME, vSURNAME
FROM applicants
WHERE id_number = :P2_ID_NUMBER;
:P2_NAME := vNAME;
:P2_SURNAME := vSURNAME;
ELSE
apex_application.g_print_success_message := '<span style="color:red">Applicant does not exist.</span>';
END IF;
EXCEPTION WHEN NO_DATA_FOUND THEN
apex_application.g_print_success_message := '<span style="color:red">Exception Caught.</span>';
END;The PL/SQL block works except for error displaying part (but that's a problem for another day).
NB: On my application, there’s already Automated Row Fetch & Automatic Row Processing (DML) processes for one table. Furthermore, there is also a javascript for verifying the validity of an id number. As a result, I decided to include Automated Row Fetch & Automatic Row Processing (DML) processes for the other table. When I click a Search button the javascript is activated even though I did not specify a URL target for the button - because this is a simple button among region items – it does not have Optional Url Redirect section.
I'm not sure what I'm doing wrong here - any help is appreciated.
Regards
KamoHi Dan,
Sorry for causing confusion with my post - it's just that I was asking the same question (with different constraints) as I had asked before so I didn't feel like going to details was necessary because in my post I included a link to the previous thread. Interestingly, I was working on apex.oracle.com when I posted the original thread - the only problem came to be when I started to move the solution to my application on my machine.
Anyway, thanks for the response!
Regards
Kamo -
Error calling a procedure from AM
Hi,
I am getting the following error while trying to call a procedure from AM. I have checked and all the parameters are being passed correctly. Not sure why this is throwing error. Below is the error message.
oracle.apps.fnd.framework.OAException: java.sql.SQLException: ORA-06550: line 1, column 7:
PLS-00306: wrong number or types of arguments in call to 'AbcPositionDetails'
ORA-06550: line 1, column 7:
PL/SQL: Statement ignored
Any help is appreciated.
Thanks in advance
PKPk,
The exception "wrong number or types of arguments in call to 'AbcPositionDetails'" means you are passing wrong parameter types to the procedure or the parameter arguement is differrent.
for example if the procedure definition is AbcPositionDetails(*x* in varchar2, y in varchar2) , you are calling in AM
Like Call procedure (begin AbcPositionDetails(*z* => :1 , t => :2) ; end;
To resolve the issue, you should call the procedure (begin AbcPositionDetails*(x* => :1 , y => :2) ; end;
i.e. The definition of the procedure should not change
(or) You can call like this (begin AbcPositionDetails( :1 , :2) ; end;
thanks,
Kumar -
Curious thing while calling a procedure from Java !...
Hi !. My name is Agustin and my doubt would be the following one... I am working for a e-business comp and they asked me to call a procedure from java... The code is the following one:
CallableStatement cs = null;
System.out.println("Fecha Nro. 1: " + paramFechaDesde);
System.out.println("Fecha Nro. 2: " + paramFechaHasta);
try
cs = getDBTransaction().createCallableStatement("{call paq_w_ListadoSiniestralidadART. p_sinsiniest(?,?,?,?) }",0);
cs.registerOutParameter(4,OracleTypes.VARCHAR);
cs.setInt(1,paramContrato.intValue());
cs.setString(2,paramFechaDesde);
cs.setString(3,paramFechaHasta);
cs.setString(4,paramNombreArchivo);
cs.executeQuery();
String nomArchivo = cs.getString(4);
System.out.println("### " + nomArchivo +" ###");
catch(SQLException e)
The weird thing is that, I was expecting a big big exception but the only thing I got is
### Error ###
The String I am expecting is a file's name !; so I am a little bit confused...
Also I didn't know where to post so If it's in the wrong category... I apologize !... If anyone need more details, I'll be checking out... The account I am working on is an Insurance company, who is the one who provide access to the DB and the procedures... So I can't check what's inside...Please provide your Java and OS versions, the JDBC jar file and the Oracle DB version being used when you post.
>
I was expecting a big big exception
>
Then why do you have an empty exception block? That just makes it disappear so you won't see one if it happens.
And your code has
cs.registerOutParameter(4,OracleTypes.VARCHAR);
cs.setString(4,paramNombreArchivo);You use 'registerOutParameter' for an OUT parameter and the 'setXXX' methods for other parameters.
Remove the 'setSTring' for the OUT parameter.
Then as malcollmmc already said
>
Sounds like the PL/SQL is returning "Error" as the 4th parameter of the call
>
The actual value returned by PL/SQL is strictly determined by the PL/SQL code and Java and JDBC are not involved.
Fix the code problems, retest, and folllowup with whoever wrote the code if it still returns ERROR. -
Urgent! Call stored procedure from jdbc vs. call from sqlplus?
Hello I met a strange problem when using JDBC (to Oracle). I have a stored procedure mypack.myproc, which updates a table (only one row and one column in the table). I found that when I called the procedure directly from sql*plus, like:
==========
BEGIN
mypack.myproc;
END;
==========
the value is 2, which is correct.
However, if I call the procedure from with in java via jdbc, the value become 591 (which is ridiculous), the jdbc call looks like:
================
cstmt = con.prepareCall("{call mypack.myproc}");
cstmt.executeUpdate();
con.commit();
================
This is really wield, Any idea?
ThanksHey buddy, it's you again. Just let you know that you are right. The problem is caused by mis-match between jdbc date and oracle date (that procedure is used to do some date calculation). My co-worker suggested me to add this statement in the procedure, and it did solved problem:
================
DBMS_SESSION.SET_NLS( 'NLS_DATE_FORMAT', '''DD-MON-RRRR''' );
================ -
Can't call a procedure from a PLSQL Library inside forms 10g
Hello,
I build a plsql library using forms builder, then I compile it and add to FORMS_PATH.
I try to use a procedure from that lib so i attached the library to form (without path), then in then WHEN-BUTTON-PRESSED event I call one procedure from that library and i get this message :
error 201 at line 6 , column 2
identifier 'LIST_ADD_ALL' must be declared
---- MY CODE compiled ok with out errors i've got pll and plx
declare
START_LIST_ID ITEM := FIND_ITEM('LIST16');
END_LIST_ID ITEM := FIND_ITEM('ITEM18');
begin
LIST_ADD_ALL(START_LIST_ID, END_LIST_ID);
end ;
I dont know if to put some kind of public declaration.
can anyone help me please.In that case, use a batch file to start Form Builder to control your environment settings. The batch file ( e.g. FormsBuilder.bat ) should look roughly like this:
set oracle_home=C:\Oracle\Dev10g
set forms=%oracle_home%\forms
set nls_lang=AMERICAN_AMERICA.WE8MSWIN1252
set tns_admin=c:\oracle\admin
set ca_uprefs=c:\data\oracle\10g\uprefs
set path=%oracle_home%\bin;%path%
set forms_path=c:\data
set oratemp=c:\temp
start frmbld.exe -
How to call stored procedure from Pro*C
How to call stored procedure from Pro*C ?
my system spec is SuSE Linux 9.1, gcc version : 3.3.3, oracle : 10g
my Pro*C code is the following..
EXEC SQL EXECUTE
begin
test_procedure();
end;
END-EXEC;
the test_procedure() has a simple update statement. and it works well in SQL Plus consol. but in Pro*C, there is a precompile error.
will anybody help me what is the problem ??I'm in the process of moving C files (with embedded SQL, .PC files) from Unix to Linux. One program I was trying to compile had this piece of code that called an Oracle function (a standalone), which compiled on Unix, but gives errors on Linux:
EXEC SQL EXECUTE
BEGIN
:r_stat := TESTSPEC.WEATHER_CHECK();
END;
END-EXEC;
A call similar to this is in another .PC file which compiled on Linux with no problem. Here is what the ".lis" file had:
Pro*C/C++: Release 10.2.0.1.0 - Production on Mon Jun 12 09:26:08 2006
Copyright (c) 1982, 2005, Oracle. All rights reserved.
Error at line 193, column 5 in file weather_check.pc
193 BEGIN
193 ....1
193 PCC-S-02346, PL/SQL found semantic errors
Error at line 194, column 8 in file weather_check.pc
194 :r_stat := TESTSPEC.WEATHER_CHECK();
194 .......1
194 PLS-S-00000, Statement ignored
Error at line 194, column 18 in file weather_check.pc
194 :r_stat := TESTSPEC.WEATHER_CHECK();
194 .................1
194 PLS-S-00201, identifier 'TESTSPEC.WEATHER_CHECK' must be declared
Pro*C/C++: Release 10.2.0.1.0 - Production on Mon Jun 12 09:26:08 2006
Copyright (c) 1982, 2005, Oracle. All rights reserved.
System default option values taken from: /oracle_client/product/v10r2/precomp/ad
min/pcscfg.cfg
Error at line 194, column 18 in file weather_check.pc
:r_stat := TESTSPEC.WEATHER_CHECK();
.................1
PLS-S-00201, identifier 'TESTSPEC.WEATHER_CHECK' must be declared
Error at line 194, column 8 in file weather_check.pc
:r_stat := TESTSPEC.WEATHER_CHECK();
.......1
PLS-S-00000, Statement ignored
Semantic error at line 193, column 5, file weather_check.pc:
BEGIN
....1
PCC-S-02346, PL/SQL found semantic errors
Maybe you are looking for
-
I am just about ready to give up on itunes
I have had so many problems with itunes in the last week. I first tried to update to itunes 10 on my laptop with no luck, it just kept coming up with different errors. I was then told to completely uninstall itunes and download from scratch, I did th
-
Process chain: how to automatically remove from schedule?
Hi All, Is there a way to automatically remove a process chain from schedule when it has failed? Thanks, Natalie
-
XML Slideshow v3 - thumbs not moving
I have selected a display from the Easy section. It has the thumbs listed vertically on the left side of the frame. Although there are many pics, the display or 3 thumbs stays static, irrespective what is displayed or if the left/right arrows are pre
-
Adobe Reader 9 converted all my doc files to Adobe?? Now they don't open
How do I reverse this?
-
Is there a way to repair pixels on my screen
i have a line through the centre of my screen and i think its the pixels can i repair this