Procedure error.
Hello,
I tried to create a procedure without any errors, but while executing I get error.
======================================================
create or replace procedure pod_connect
as
v_date date;
v_hldg_cusip fund_holding_d.hldg_instrument_id%TYPE;
v_hldg_ticker instruments.ticker%TYPE;
v_hldg_sedol instruments.sedol%TYPE;
v_hldg_type funds.fund_typ_cd%TYPE;
v_d_date date;
cursor c1 is select hldg_cusip from temp_raw_fund_holdings;
begin
select date_value
into v_date from ude_cycle_data_dates where date_type_code = 'CYCLE';
insert into temp_raw_fund_holdings
( fund_id, fund_name, fund_dt, fund_cusip, hldg_cusip, hldg_shares, hldg_price, hldg_mv, hldg_pct, user_id, load_dt, change_dt, gnrd_src_id, snap_dt)
select f.instrument_id,
null,
'13-apr-2006',
i.cusip,
f.hldg_instrument_id,
f.hldg_shares,
f.hldg_prc,
f.hldg_mkt_val,
f.hldg_pct,
f.last_mod_id,
f.d_date,
f.d_date,
11, -- it is numeric value and not null.
f.d_date
from fund_holding_d f,
(select * from instruments where ticker in ('FSCFX', 'FINFX') ) i
where (f.instrument_id = i.instrument_id )
and f.d_date = v_date;
FOR c1_rec IN c1
LOOP
select ticker, sedol into v_hldg_ticker, v_hldg_sedol from instruments
where instrument_id = c1_rec.hldg_cusip;
update temp_raw_fund_holdings
set hldg_ticker = v_hldg_ticker,
hldg_sedol = v_hldg_sedol where hldg_cusip = c1_rec.hldg_cusip;
END LOOP;
end;
Procedure created.
SQL> exec procedure pod_connect;
BEGIN procedure pod_connect; END;
ERROR at line 1:
ORA-06550: line 1, column 7:
PLS-00103: Encountered the symbol "PROCEDURE" when expecting one of the
following:
begin case declare exit for goto if loop mod null pragma
raise return select update while with <an identifier>
<a double-quoted delimited-identifier> <a bind variable> <<
close current delete fetch lock insert open rollback
savepoint set sql execute commit forall merge
<a single-quoted SQL string> pipe
<an alternatively-quoted SQL string>
=========================
Any help would be greatly appreciated.
Please format your code next time for better readability using standard UBB notation: [pre] and [/pre].
Execute your procedure in SQL*Plus:
exec pod_connect;
Similar Messages
-
Hi everyone,
I have form which has two database procedures in key commit trigger. If any error occurs while executing the second database procedure
I dont want to save the form and first database procedure values. Can anyone please tell me how to pass the database procedure error to
form so that it can stop the saving of form and first database procedure .
Thanks in advance for any reply.Dear all,
Thanks for your kind reply.
I have tried using DBMS_ERROR_CODE in ON-ERROR trigger. My code appears like this.
create or replace procedure_name(parmeters) as --- This is a database procedure;
begin
procedure_body;
exception
when others then
Raise_application_error(-20025,'Error Message');
end;
In form in ON_ERROR trigger I have declared like this:
IF DBMS_ERROR_CODE = -20025 THEN
MESG('Error in Insertion');
Raise form_trigger_failure;
END IF;
I am not getting error message that I declared in ON_ERROR trigger instead I am getting error message from raise_application_error statement.
Could anyone please guide me exactly how to catch the database procedure in form level so that I can stop exceution of the form. -
Calling the Java Method in PL/SQL Java Stored procedure errors out
Hi,
I could not find a suitable thread to post my PL/SQL question so iam posting it here.........
I have written a java class by name XYZ which has a method ABC for which there are 9 arguements being passed and its a VOID method.
This java class has been loaded into ORACLE using DBMS_JAVA.LOADJAVA pkg, Now this class is being called in the oracle as a JAVA Stored procedure...... When ever im trying to call the procedure it throws the following error
ORA-29531: no method
*Cause: An attempt was made to execute a non-existent method in a
Java class.
*Action: Adjust the call or create the specified method.
The code snippet as follows
JAVA CODE:
Class xyz
public static void Abc (String hostName,
int port,
String serviceURL,
String soapAction,
int timeOut,
String wsUser,
String wsPasWd,
String keyStore,
String keyStorePasWd)
//method implementation
JAVA STORED PROCEDURE:
create OR REPLACE procedure ABC_JAVA_SP_CALL
(p_hostname in varchar2, p_port in number, p_serviceurl in varchar2, p_soapaction in varchar2, p_timeout in number, p_wsuser in varchar2, p_wspasswd in varchar2, p_ks_path in varchar2, p_ks_passwd in varchar2)
as
language java
name 'xyz.Abc(java.lang.String, int, java.lang.String, java.lang.String, int, java.lang.String, java.lang.String, java.lang.String, java.lang.String)';
When i try to call
declare
p_hostname varchar2(100);
p_port number;
p_serviceurl varchar2(100);
p_soapaction varchar2(100);
p_timeout number;
p_wsuser varchar2(100);
p_wspasswd varchar2(100);
p_ks_path varchar2(100);
p_ks_passwd varchar2(100);
begin
//SP which returns the values for the required parameters.
comppkg.getvcsinfo(
p_hostname,
p_port ,
p_serviceurl,
p_soapaction,
p_timeout,
p_wsuser,
p_wspasswd,
p_ks_path,
p_ks_passwd
Layer7_icengc_ws_tes(p_hostname,
p_port ,
p_serviceurl,
p_soapaction,
p_timeout,
p_wsuser,
p_wspasswd,
p_ks_path,
p_ks_passwd);
end;
This thing ends up with
29531. 00000 - "no method %s in class %s"
*Cause: An attempt was made to execute a non-existent method in a
Java class.
*Action: Adjust the call or create the specified method.
Im not understanding what wrong am i doing
pls help
Edited by: madhusudan on Feb 12, 2013 8:07 PMHello,
there is the forum {forum:id=65} for questions about using Java within Oracle.
Regards
Marcus
Edited by: Marwim on 13.02.2013 07:56
I could not find a suitable thread to post my PL/SQL question so iam posting it here.........You got the hint to the correct forum alread in another thread {message:id=10837976}
And if you think this is not related to Java but PL/SQL, then you should ask in {forum:id=75} -
Execute procedure error (Native SQL)
Hi experts,
I create a procedure
EXEC SQL.
create or replace procedure update_zsmadiprinc
is begin
( p_codigo in number(5),
p_ano in varchar2(4),
p_doc_vlr_princ in varchar2(10)
p_subrc out number ) is begin
update T_INTERF_RESSARC_FORNEC_R3
set ano_doc = p_ano,
NUM_DOC_VALOR_PRINC = p_doc_vlr_princ,
where cod_interf_ressarc_fornec_r3 = p_codigo;
if sql%found then
p_subrc := 0;
else
p_subrc := 4;
end if;
end;
ENDEXEC.
and execute it
EXEC SQL.
execute procedure update_zsmadiprinc
(in :wa-cod_interf,
in :wa-ano_doc,
in :wa-num_doc_valor_princ,
out :vg_subrc)
ENDEXEC.
But when i execute the procedure, shows dump error:
Database error text........: "ORA-06550: line 1, column 7:#PLS-00905: object
UPDATE_ZSMADIPRINC is invalid#ORA-06550: line 1, column 7:#PL/SQL:
Statement ignored#"
Triggering SQL statement...: "CLOSE "
Internal call code.........: "[DBDS/NEW DSQL]"
Please check the entries in the system log (Transaction SM21).
I comment all source, and the error is the same.
When i create the procedure, no erros are show.
I changed the name of the procedure, the type of parameters, and now i comment all and the error always is the same!!!! Can you help me!!! I need to finish this urgently!
Thanks in advance
Message was edited by:
RPIt is not possible to create a procedure, then, i just execute sql direct.
thanks -
Hi,
My Problem is when im adding dataset with stored procedure, im getting this error.
I Can access database,
Could not create a list of fields for the query. Verify that you can connect to the data source and that your query syntax is correct.
ORA-06550: line 1, column 7: PLS-00306: wrong number or types of arguments in call to 'PROCEDURE_NAME' ORA-06550: line 1, column 7: PL/SQL:
Statement ignored
stored procedure is simple select :
CREATE OR REPLACE PROCEDURE [PROCEDURE_NAME](L_CURSOR out SYS_REFCURSOR)
is
Begin
open L_CURSOR for
SELECT [columnname] FROM
[tablename]
End;
Configuration Details:
DB: Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - 64biOracle Developer Tools for Visual Studio Copyright (c) 2005,2014 SQL Server Data Tools Type: Oracle , Data Provider : .Net Framework Data Provider For OracleThe answer is of inside question. It is about provider. Change my provider ODTwithODAC for 10g (my database version). And problem resolved.
Thank you for your helps,
Regards,
Arda -
ORABPEL-11809 - call a stored procedure - error in OUT parameter
Hi all.
I have a problem in a BPEL process that calls a stored procedure.
I create a Partner Link that calls a stored procedure in the database. That procedure returns a type that is a table (is defined as a type of the database).
When I deploy the process I have the following error:
<messages>
- <input>
- <WC01_Pesquisa_Ut_InputVariable>
- <part xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" name="InputParameters">
- <InputParameters xmlns="http://xmlns.oracle.com/pcbpel/adapter/db/IGIF/WC01/PESQUISA_UT/">
<P_NIR xmlns="">
165968274
</P_NIR>
<P_NOME_COMPLETO xmlns="">
carla diogo
</P_NOME_COMPLETO>
<P_SEXO xmlns="">
Feminino
</P_SEXO>
<P_DATA_NASC xmlns="">
2007-03-01
</P_DATA_NASC>
<P_NATURALIDADE xmlns=""/>
</InputParameters>
</part>
</WC01_Pesquisa_Ut_InputVariable>
</input>
- <fault>
- <remoteFault xmlns="http://schemas.oracle.com/bpel/extension">
- <part name="code">
<code>
17002
</code>
</part>
- <part name="summary">
<summary>
file:/oracle/product/10.1.3/SOA/Integration10131/bpel/domains/default/tmp/.bpel_SaudeIdentificarCidadao_5.0_e3768f57d137443e1ba52d4a6d809426.tmp/WC01_Pesquisa_Ut.wsdl [ WC01_Pesquisa_Ut_ptt::WC01_Pesquisa_Ut(InputParameters,OutputParameters) ] - WSIF JCA Execute of operation 'WC01_Pesquisa_Ut' failed due to: Error registering an out parameter.
An error occurred when registering parameter PESQUISA_UT as an out parameter of the IGIF.WC01.PESQUISA_UT API. Cause: java.sql.SQLException: Io exception: Connection reset [Caused by: Io exception: Connection reset]
; nested exception is:
ORABPEL-11809
Error registering an out parameter.
An error occurred when registering parameter PESQUISA_UT as an out parameter of the IGIF.WC01.PESQUISA_UT API. Cause: java.sql.SQLException: Io exception: Connection reset [Caused by: Io exception: Connection reset]
Check to ensure that the parameter is a valid IN/OUT or OUT parameter of the API. Contact oracle support if error is not fixable.
</summary>
</part>
- <part name="detail">
<detail>
Internal Exception: java.sql.SQLException: Io exception: Connection resetError Code: 17002
</detail>
</part>
</remoteFault>
</fault>
</messages>
The code of the XSD created when I create the partner link is:
<schema targetNamespace="http://xmlns.oracle.com/pcbpel/adapter/db/IGIF/WC01/PESQUISA_UT/" xmlns="http://www.w3.org/2001/XMLSchema" xmlns:db="http://xmlns.oracle.com/pcbpel/adapter/db/IGIF/WC01/PESQUISA_UT/"
elementFormDefault="unqualified" attributeFormDefault="unqualified">
<element name="InputParameters">
<complexType>
<sequence>
<element name="P_NIR" type="decimal" db:index="1" db:type="NUMBER" minOccurs="0" nillable="true"/>
<element name="P_NOME_COMPLETO" type="string" db:index="2" db:type="VARCHAR2" minOccurs="0" nillable="true"/>
<element name="P_SEXO" type="string" db:index="3" db:type="VARCHAR2" minOccurs="0" nillable="true"/>
<element name="P_DATA_NASC" type="dateTime" db:index="4" db:type="DATE" minOccurs="0" nillable="true"/>
<element name="P_NATURALIDADE" type="string" db:index="5" db:type="VARCHAR2" minOccurs="0" nillable="true"/>
</sequence>
</complexType>
</element>
<element name="OutputParameters">
<complexType>
<sequence>
<element name="PESQUISA_UT" type="db:TABELA_DE_IDS" db:index="0" db:type="Array" minOccurs="0" nillable="true"/>
</sequence>
</complexType>
</element>
<complexType name="TABELA_DE_IDS">
<sequence>
<element name="PESQUISA_UT_ITEM" type="decimal" db:type="NUMBER" minOccurs="0" maxOccurs="unbounded" nillable="true"/>
</sequence>
</complexType>
</schema>
Any ideia?
Thanks in advance.
CarlaI'd suggest that you turn on xml validation on the bpel boundaries to make sure that the xml being passed to the adapter is valid. You do this by logging in to bpel console, go to Manage Domain, at the bottom of the Configuration tab, set validateXml to true.
Then see if it is an xml validation issue - in which case you will have to fix your maps to make sure it is valid indeed.
Assuming your XML is valid and you are still seeing this error, couple of follow up questions:
- are you using synonyms ?
-- note that synonyms are not supported completely by the adapter at this time.
- could you spell out where your types/sp-pkg resides and what are you connecting as at runtime ?
-- just to keep things simple enough to debug, i'd do everything as just one user and slowly go to a scheme that you desire.
HTH -
Pricing procedure error in Sales Order
Hi,
I have made all necessary SD config. setting for pricing procedure creation and determination in Sales orders. But while creating a sales order I am getting an error as "No pricing procedure could be determined as entries are missing in TAble 683v. but I can see the relevant entry in this table. How this error can be rectified. i am unable to procees for sales order creation.Hi,
Check in sales document type - VOV8 Which document price procedure you maintained under transaction flow tab
Check in customer master which customer master pricing procedure maintained in sales area data >> sales tab >> pricing/statistic.
Then in pricing procedure determination OVKK maintain
Sales orgz + Dchl + Div + Document price procedure + Customer price procedure = PRICED PROCEDURE
Kapil -
Crystal Report That Uses Stored Procedure Errors when connecting to the DB
We had developed reports a few years ago, including one that calls a Stored Procedure on an iSeries AS400 DB2 database. We upgraded our environments to Crystal Reports 2008 and BO XI 3.1. Now, the existing report that previously ran in the old environment is not running (note that the other SQL-based reports work without a problem, only this one which uses a store procedure is not working). I downloaded the report into my local Crystal Reports designer and tried to run it from there and I got the following error message:
======
Failed to retieve data from the database.
Details: ADO Error Code: 0x
Source Microsoft OLE DB Provider for ODBC Drivers
Description: [IBM][iSeries Access ODBC Driver] Statement violates access rule: Connection is set to read only.
SQL State: 37000
Native Error: [Database Vendor Code: 30186 ]
======
{CALL "<database>"."<library>"."RELEASEDNOTINVOICE"({d '2010-03-01'})}
This call will still work from on a SQL client running on a JDBC connection. Is there some problem with the new verion of BO and Crystal Reports with using the iSeries ODBC driver?...my issue was resolved by setting the ODBC.INI registry entry for AllowProcCalls from 0 to 1.
-
JDBC Receiver Adapter - Stored Procedure - Error Illegal Parameter
Hi experts,
I have a problem with the next scenario:
HTTP <-> XI -> JDBC
XI sends the following message to JDBC Adapter in mode Receiver to execute a Stored Procedure in a Informix database:
<ns0:mt_messageTestSP xmlns:ns0="urn:test">
<statement>
<hastus_exporta_dia action="execute">
<fechaEnvio isInput="true" type="DATE">11/17/2008</fechaEnvio>
</hastus_exporta_dia>
</statement>
</ns0:mt_messageTestSP>
Note: The format that accepts the SP Informix in the field of type date is: MM/dd/yyyy
The SP is running on an Informix database, and the parameter (fechaEnvio) that receive the SP is of type DATE. At runtime the SP does not run, and in the Component Monitoring of the Runtime Workbench I see the following error:
Unable to execute statement for table or stored procedure. 'hastus_exporta_dia' (Structure 'statement') due to java.lang.IllegalArgumentException
Any idea?
Thanks,
Jose.Hi,
Check the date format...once again...
In oracle date format is DD/MM/YYYY but if the same is sent from PI its throwing the error....
but when i send the format as DD-Mon-YYYY its accepting and showing as DD/MM/YYYY in oracle tables
so just try fetching the date field from the informix database and see how it is get converted into..and based on that send the format
HTH
Rajesh -
Bea type 4 db2 driver-stored procedure error
Iam creating a connection pool in weblogic 9.2 MP2
using bea type 4 db2 driver and excuting a stored procedure.Iam getting following error
I enabled spy
spy(2008/02/13 09:41:58.050)>> Driver Name = DB2
spy(2008/02/13 09:41:58.050)>> Driver Version = 3.60.24 (023731.010811.022315)
spy(2008/02/13 09:41:58.050)>> Database Name = DB2/MVS
spy(2008/02/13 09:41:58.050)>> Database Version = 8.1.5
spy(2008/02/13 09:44:11.063)>> java.sql.SQLException: [BEA][DB2 JDBC Driver][DB2]UNACCEPTABLE SQL STATEMENT ErrorCode=-84 SQL
State=42612
The code is using
CALL SP03 (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
as follows
String sql = "CALL SP03 (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)";
myCallableStmt = con.prepareCall(sql);
is ther are any issues in calling stored procedure with type 4 bea db2 driver.
connectrion pool details
jdbc:bea:db2://server:447
weblogic.jdbc.db2.DB2Driver
user=user
LocationName=server
portNumber=447
serverName=host
batchPerformanceWorkaround=true
The code is working fine with type 2 ibm driver connection pool
Also Iam trying with ibm type 4 driver
Iam getting following error in configuration itself
<Feb 13, 2008 11:18:44 AM EST> <Error> <JDBC> <BEA-001112> <Test "SELECT COUNT(*) FROM
abc.xy_def" set up for pool "DataSourceIBM" failed with exception: "com.ibm.db2.jcc.a.SqlException: DB2 SQL error: SQLCODE: -725,
SQLSTATE: 42721, SQLERRMC: CLIENT APPLNAME;server".>
details
jdbc:db2://mvsavt1_vipa.corpny.csfb.com:447/server
com.ibm.db2.jcc.DB2Driver
user=user
locationName=server
portNumber=450
drivertype=4
Any configuration required at db2 serverOk, Odd. Please email this post (the code below) and the
output of each to [email protected] and ask them to investigate
why one driver finds the procedure and the other doesn't.
This will get back to me officially, and then I will be able
to enlist all the resources to debug it. Is the stored
procedure owned by the same schema as your 'user'?
Mohamed Rabbani P M wrote:
Joe,
It is the same code you gave
BEA Driver Code
import java.io.*;
import java.util.*;
import java.net.*;
import java.sql.*;
import weblogic.common.*;
public class dddb2
public static void main(String argv[])
throws Exception
Connection c = null;
try
java.util.Properties props = new java.util.Properties();
Driver d = (Driver)Class.forName("weblogic.jdbc.db2.DB2Driver").newInstance();
props.put("user", "user");
props.put("password", "password");
props.put("locationName", "dbserver");
String URL = "jdbc:bea:db2://dbhost:447";
c = d.connect(URL, props);
DatabaseMetaData dm = c.getMetaData();
System.out.println(dm.getDriverVersion());
System.out.println("Database version is " + dm.getDatabaseProductVersion() );
CallableStatement p = c.prepareCall("{ CALL SP03 (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) }");
p.setInt(1,1234);
p.setString(2,"XYZ");
p.setString(3,"XYZ");
p.setInt(5,1234);
p.setString(6,"");
p.setString(7,"XYZ");
p.setString(9,"XYZ");
p.setString(12,"XYZ");
p.registerOutParameter(4,Types.INTEGER);
p.registerOutParameter(8,Types.INTEGER);
p.registerOutParameter(10,Types.INTEGER);
p.registerOutParameter(11,Types.INTEGER);
p.registerOutParameter(13,Types.INTEGER);
p.setFetchSize(3);
p.execute();
catch (Exception e)
{ e.printStackTrace(); }
finally
{ try {c.close();}catch (Exception e){} }
IBM Driver Code
import java.io.*;
import java.util.*;
import java.net.*;
import java.sql.*;
import weblogic.common.*;
public class dddb2ibm
public static void main(String argv[])
throws Exception
Connection c = null;
try
java.util.Properties props = new java.util.Properties();
Driver d = (Driver)Class.forName("com.ibm.db2.jcc.DB2Driver").newInstance();
props.put("user", "user");
props.put("password", "password");
//props.put("databaseName", "dbserver");
String URL = "jdbc:db2://dbhost:447/dbserver";
c = d.connect(URL, props);
DatabaseMetaData dm = c.getMetaData();
System.out.println(dm.getDriverVersion());
System.out.println("Database version is " + dm.getDatabaseProductVersion() );
CallableStatement p = c.prepareCall("{ CALL SP03 (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) }");
p.setInt(1,1234);
p.setString(2,"XYZ");
p.setString(3,"XYZ");
p.setInt(5,1234);
p.setString(6,"");
p.setString(7,"XYZ");
p.setString(9,"XYZ");
p.setString(12,"XYZ");
p.registerOutParameter(4,Types.INTEGER);
p.registerOutParameter(8,Types.INTEGER);
p.registerOutParameter(10,Types.INTEGER);
p.registerOutParameter(11,Types.INTEGER);
p.registerOutParameter(13,Types.INTEGER);
p.setFetchSize(3);
p.execute();
catch (Exception e)
{ e.printStackTrace(); }
finally
{ try {c.close();}catch (Exception e){} } -
Stored Procedure error with JDBC:ODBC
Hi,
I am trying to run a stored procedure on RDMS (Uniaccess ODBC). This has 2 input parameters and returns a resultset of 3 columns. The following is the error I am getting and am stumped. Please help..
(similar call statement works with VB and ADO)
--------output ---------------
Calling MGC005
inside resultset sun.jdbc.odbc.JdbcOdbcCallableStatement@129206
row 1
get string 0004
get string 00000
get string
SQLEcception : java.sql.SQLException: [AIS][UniAccess ODBC Driver]Invalid Column Number//Specified column is before the column specified in the previous call
----------------------source code ------------------
import java.awt.Graphics;
import java.sql.*;
public class JdbcTest {
public JdbcTest() {
Connection con;
CallableStatement stmt;
try {
Class.forName( "sun.jdbc.odbc.JdbcOdbcDriver");
catch (Exception ex) {
System.out.println ("Database Driver not found");
System.exit(0);
try {
String msDbUrl = "jdbc:odbc:CMS_TEST_ODBC";
con = DriverManager.getConnection(msDbUrl, user, password );
stmt = con.prepareCall("{ call MGC005(?, ?)}");
stmt.setString( 1, "CH" );
stmt.setString( 2, "ARRINGTON0909170320010615" );
// stmt.registerOutParameter( 1, java.sql.Types.VARCHAR);
// stmt.registerOutParameter( 2, java.sql.Types.VARCHAR );
// stmt.registerOutParameter( 3, java.sql.Types.VARCHAR );
System.out.println( "Calling MGC005 " );
ResultSet rs = stmt.executeQuery();
while (rs.next()) {
System.out.println( " inside resultset " + rs.getStatement() );
System.out.println( " row " + rs.getRow() );
System.out.println( " get string " + rs.getString(1) );
System.out.println( " get string " + rs.getString(2) );
System.out.println( " get string " + rs.getString(3) );
String i = rs.getString (1);
String s = rs.getString (2);
String t = rs.getString (3);
String text = i + " " + s ;
System.out.println ( " Output " + text);
stmt.close();
con.close();
} catch( SQLException ex ) {
System.out.println ("SQLEcception : " + ex);
public static void main(String[] args) {
new JdbcTest();
}Hi,
The error seems to occur on the line:
String i = rs.getString (1);
The error exactly states what is occuring: "Specified column is before the column specified in the previous call". Try limiting the call to getString() to one for each column for each row.
Try replacing these lines:
System.out.println( " get string " + rs.getString(1) );
System.out.println( " get string " + rs.getString(2) );
System.out.println( " get string " + rs.getString(3) );
String i = rs.getString (1);
String s = rs.getString (2);
String t = rs.getString (3);
with something like:
String i = rs.getString (1);
System.out.println( " get string " + i);
String s = rs.getString (2);
System.out.println( " get string " + s);
String t = rs.getString (3);
System.out.println( " get string " + t);
Hope this works,
Kurt. -
Callable statement with oracle stored procedure error
i'm calling a stored procedure in java with the following code. However i constantly recieve this error
so what is going on please HELP
Parameter Type Conflict: sqlType=2006
my call statement would be this:
call Statement = {call getUserByLogin(?,?,?,?)}
if(storedProcedureName=="getUserByLogin"){
strCStmt = ("{call " + storedProcedureName +"(?,?,?,?) }");
cStmt.setObject(1, "system");
cStmt.setObject(2, "username");
cStmt.setObject(3,"password");
cStmt.registerOutParameter(4, java.sql.Types.REF);
rs = cStmt.executeQuery();
i've also tried it with a setString as the IN parameter:
here's the stored procedure:
CREATE OR REPLACE PROCEDURE getUserByLogin (
arg_subscriptionName IN varchar,
arg_loginName IN varchar,
arg_password IN varchar,
arg_rec_userinfo_valLanguage OUT types.rec_userinfo_valLanguage
) AS
var_userNum int;
BEGIN
select
u.userNum into var_userNum
from
userInfo u,
subscription s
where
s.subscriptionName = arg_subscriptionName AND
s.subscriptionNum = u.subscriptionNum AND
u.loginName = arg_loginName AND
u.password = arg_password;
if (var_userNum is null) then
var_userNum := 0;
end if;
getUser(var_userNum, arg_rec_userinfo_valLanguage);
END;i'm calling a stored procedure in java with the
following code. However i constantly recieve this
error
so what is going on please HELP
Parameter Type Conflict: sqlType=2006
my call statement would be this:
call Statement = {call getUserByLogin(?,?,?,?)}
if(storedProcedureName=="getUserByLogin"){
strCStmt = ("{call " + storedProcedureName +"(?,?,?,?)
cStmt.setObject(1, "system");
cStmt.setObject(2, "username");
cStmt.setObject(3,"password");
cStmt.registerOutParameter(4, java.sql.Types.REF);
rs = cStmt.executeQuery();
i've also tried it with a setString as the IN
parameter:
here's the stored procedure:
CREATE OR REPLACE PROCEDURE getUserByLogin (
arg_subscriptionName IN varchar,
arg_loginName IN varchar,
arg_password IN varchar,
arg_rec_userinfo_valLanguage OUT
types.rec_userinfo_valLanguage
) AS
var_userNum int;
BEGIN
select
u.userNum into var_userNum
from
userInfo u,
subscription s
where
s.subscriptionName = arg_subscriptionName AND
s.subscriptionNum = u.subscriptionNum AND
u.loginName = arg_loginName AND
u.password = arg_password;
if (var_userNum is null) then
var_userNum := 0;
end if;
getUser(var_userNum, arg_rec_userinfo_valLanguage);
END;
/Hai,
Try with this if u are using Oracle.
import oracle.sql.*;
import oracle.jdbc.driver.*;
(inbetween ur code)
cStmt.registerOutParameter(4, OracleTypes.CURSOR);
//in place of "cStmt.registerOutParameter(4, java.sql.Types.REF);"
Hope u reply with joy.
regards,
Siva Kumar Annavaram -
Procedure Error (oracle 10.2.0.3.0)
Hi All,
I have created a procedure. but it's giving error while executin .please look into this.
create or replace PROCEDURE PR_LOAD_SMS
IS
BEGIN
EXECUTE IMMEDIATE 'TRUNCATE TABLE DSS.FORT_HZM';
EXECUTE IMMEDIATE '
INSERT INTO DSS.FORT_HZM (CO_ID,FU_CODE,FU_DESC,SCODE,S_DES,AT_DT,SDN,CODELANG)
SELECT
CONTR_SERVICES.CO_ID CO_ID,
FU_PROFILE.FUCODE FU_CODE,
FU_PROFILE.FU_DESC FU_DESC,
CONTR_SERVICES.SCODE SCODE,
MPUSNTAB.DES S_DES,
TO_DATE(SUBSTR(CONTR_SERVICES.CS_STAT_CHNG,-7,6),'YYMMDD') ACT_DT,
CONTRACT_PHONENR.NUM SDN,
CCONTACT_ALL.CCLANGUAGE CODELANG
FROM
SCS.CONTR_SERVICES CONTR_SERVICES,
SCS.FU_PROFILE FU_PROFILE,
SCS.MPUSNTAB MPUSNTAB,
DSS.CONTRACT_PHONENR CONTRACT_PHONENR,
SCS.CONTRACT_ALL CONTRACT_ALL,
SCS.CCONTACT_ALL CCONTACT_ALL,
SCS.FULKSN FULKSN
WHERE
FULKSN.FUCODE = FU_PROFILE.FUCODE
AND FULKSN.SCODE = CONTR_SERVICES.SCODE
AND MPUSNTAB.SCODE = CONTR_SERVICES.SCODE
AND CCONTACT_ALL.customer_id = CONTRACT_ALL.customer_id
AND CONTRACT_ALL.co_id = CONTRACT_PHONENR.co_id
AND CONTRACT_ALL.co_id = CONTR_SERVICES.co_id
AND CONTRACT_PHONENR.co_id = CONTR_SERVICES.co_id
AND CCONTACT_ALL.CCBILL = 'X'
AND CONTR_SERVICES.CS_STAT_CHNG LIKE ('%a')
AND FU_PROFILE.HZ_FLAG IS NOT NULL;
AND SUBSTR (NVL (CONTR_SERVICES.CS_STAT_CHNG, 'a'), -1, 1) != 'd'
AND CONTR_SERVICES.SCODE <> 4520 ;
COMMIT;
END PR_LOAD_SMS;Error:
LINE/COL ERROR
13/58 PLS-00103: Encountered the symbol "YYMMDD" when expecting one of
the following:
* & = - + ; < / > at in is mod remainder not rem return
returning <an exponent (**)> <> or != or ~= >= <= <> and or
like LIKE2_ LIKE4_ LIKEC_ between into using || multiset bulk
member SUBMULTISET_Thank youHello,
Seems like lot of syntax error and why you want to execute as dynamic sql and not just simple straight forward insert statement. I tried to modified but verify see if it helps you anyway or just post exact insert stmt that you want to execute as dynamic sql.
CREATE OR REPLACE PROCEDURE PR_LOAD_SMS
IS
BEGIN
EXECUTE IMMEDIATE 'TRUNCATE TABLE DSS.FORT_HZM';
INSERT INTO DSS.FORT_HZM (CO_ID,
FU_CODE,
FU_DESC,
SCODE,
S_DES,
AT_DT,
SDN,
CODELANG)
SELECT CONTR_SERVICES.CO_ID CO_ID,
FU_PROFILE.FUCODE FU_CODE,
FU_PROFILE.FU_DESC FU_DESC,
CONTR_SERVICES.SCODE SCODE,
MPUSNTAB.DES S_DES,
TO_DATE (
SUBSTR (CONTR_SERVICES.CS_STAT_CHNG, -7, 6),
' YYMMDD
ACT_DT,
CONTRACT_PHONENR.NUM SDN,
CCONTACT_ALL.CCLANGUAGE CODELANG
FROM SCS.CONTR_SERVICES CONTR_SERVICES,
SCS.FU_PROFILE FU_PROFILE,
SCS.MPUSNTAB MPUSNTAB,
DSS.CONTRACT_PHONENR CONTRACT_PHONENR,
SCS.CONTRACT_ALL CONTRACT_ALL,
SCS.CCONTACT_ALL CCONTACT_ALL,
SCS.FULKSN FULKSN
WHERE FULKSN.FUCODE = FU_PROFILE.FUCODE
AND FULKSN.SCODE = CONTR_SERVICES.SCODE
AND MPUSNTAB.SCODE = CONTR_SERVICES.SCODE
AND CCONTACT_ALL.customer_id = CONTRACT_ALL.customer_id
AND CONTRACT_ALL.co_id = CONTRACT_PHONENR.co_id
AND CONTRACT_ALL.co_id = CONTR_SERVICES.co_id
AND CONTRACT_PHONENR.co_id = CONTR_SERVICES.co_id
AND CCONTACT_ALL.CCBILL =
' X'
AND CONTR_SERVICES.CS_STAT_CHNG LIKE ('%a')
AND FU_PROFILE.HZ_FLAG IS NOT NULL
AND SUBSTR (NVL (CONTR_SERVICES.CS_STAT_CHNG, 'a'), -1, 1) !=
'd'
AND CONTR_SERVICES.SCODE = 4520;
COMMIT;
END PR_LOAD_SMS;Regards
Edited by: OrionNet on Apr 17, 2009 12:39 AM -
ERP2005 SR3 Create SAP Stored Procedures Error
Hi Seniors,
I have tried to install SAP ERP ECC 6.0 IDES ERP2005 SR3 , I got the error in installation step 19/26 (Create SAP Stored Procedures).
OS : WIN 2008 SERVER
DB : MS SQL 2008
I have fallow the Note 1152240.
Error log :
ERROR 2010-03-02 12:08:20.282
FCO-00011 The step ExeProcs with step key |NW_Onehost|ind|ind|ind|ind|0|0|NW_Onehost_System|ind|ind|ind|ind|2|0|NW_CreateDBandLoad|ind|ind|ind|ind|10|0|NW_Postload|ind|ind|ind|ind|10|0|NW_Postload_MSS|ind|ind|ind|ind|2|0|MssProcs|ind|ind|ind|ind|1|0|ExeProcs was executed with status ERROR .
Please help me,
Thank you,
Sagar K> I have tried to install SAP ERP ECC 6.0 IDES ERP2005 SR3 , I got the error in installation step 19/26 (Create SAP Stored Procedures).
>
> OS : WIN 2008 SERVER
> DB : MS SQL 2008
See note 1244548 - IDES ERP 6.0 ECC 6.0 SR3:
<...>
Microsoft SQL Server 2008:
An Installation of this IDES version on MSSQL 2008 is NOT possible.
Please use MSSQL 2005 as database version
<...>
The reason is that the SAP_BASIS support package is too low.
Markus -
BI Publisher 11g - calling SQL Server 2005 stored procedure error
Hi experts
I have been calling succesfully an SQL server 2005 stored procedure for the data model of a BI publisher report in 10g, passing it a customerNo parameter.
EXEC [dbo].[usp_WelcomeLettersConsumerNo]
@CustomerNo = :sCustomerNo
However it does not work in 11g I get the error:
[Hyperion][SQLServer JDBC Driver][SQLServer]Incorrect syntax near the keyword 'is'.
which is frustrating as there is no 'is' in the statement (perhaps it is picking up :s?) - I wonder does anyone know if there has been a change in 11g that may be causing this?
cheers
TimHi experts
I have been calling succesfully an SQL server 2005 stored procedure for the data model of a BI publisher report in 10g, passing it a customerNo parameter.
EXEC [dbo].[usp_WelcomeLettersConsumerNo]
@CustomerNo = :sCustomerNo
However it does not work in 11g I get the error:
[Hyperion][SQLServer JDBC Driver][SQLServer]Incorrect syntax near the keyword 'is'.
which is frustrating as there is no 'is' in the statement (perhaps it is picking up :s?) - I wonder does anyone know if there has been a change in 11g that may be causing this?
cheers
Tim
Maybe you are looking for
-
Hi, Does anyone know what table & field is the open sales order quantity stored? Thanks.
-
Ever get error code "-2146827284" when trying to open an Excel workbook using ActiveX
The error message claims that the file cannot be found, but the file is clearly there. Ever seen this? Strangely, this happens on one machine, but not on another. I'm suspecting some kind of ActiveX incompatibility and would love suggestions on how t
-
Is there a C# example of using the ExpressionEdit Control Custom Button Event Handler
TestStand 4.1 C# 2008 I have added the event handler to the ExpressionEdit events as I would any event handler: exprEdit.ButtonClick += new NationalInstruments.TestStand.Interop.UI.Ax._ExpressionEditEvents_ButtonClickEventHandler(_ExpressionEditEvent
-
Azure powershell gives the error :Your credentials have expired Please use Add-AzureAccount to login again. Keep receiving the same error even after logging in again and again. I want to create credentials for my storage account and want to take ba
-
This morning i tried to do a batch send to my clients (with a xmas card, 3MB) on my Asus Win 8.1, Outlook 7, Intel Core i7. I suppose that the weight of the batch was too large and due to this, I now get the message error 0x80070057 invalid parameter