Store proc error
i have a store proc writen in oracle, it has a cursor and it is fetching into variables.
FETCH Jrecord into
v_projectID,
v_scounty,
v_county_pct,
v_existing_lane_cnt,
v_proposed_lane_cnt,
v_comnt,
v_comnt_typ;
the store proc works fine from oracle. i get data back as
john,23,56,67,543 wells way, etc....
but when i am calling it from the bean i am getting an error back on
TPRO_J= P_TPRO.executeQuery();
now do i call the name of the fields as in the database or use the variables to call. help please and i wonder if i should be giving alias for the columns
----------here is the bean--------------------------------------------
public Vector getRecordJ(String ProjectID){
ResultSet TPRO_J=null;
try{
System.out.println("a");
CallableStatement P_TPRO=conOrcl.prepareCall("{call getJrecord(?)}");
//assign the ? to the argument passed
System.out.println("b");
P_TPRO.setString(1,ProjectID);
//execute the query
System.out.println("c");
TPRO_J= P_TPRO.executeQuery();
//looping through the resultSet
System.out.println("d");
while (TPRO_J.next()){
System.out.println("e");
//create an instance of the class
Conn JItems = new Conn();
// set it to the Bean
JItems.setCounty(TPRO_J.getString("county"));
JItems.setCountyPct(TPRO_J.getInt("county_pct"));
JItems.setexistingLane(TPRO_J.getInt("existing_lane_cnt"));
JItems.setproposed_lane(TPRO_J.getInt("proposed_lane_cnt"));
JItems.setcomnt(TPRO_J.getString("comnt"));
JItems.setcomntType(TPRO_J.getString("comnt_typ"));
//add the object to the vector
V_itemsJ.addElement(JItems);
}catch(SQLException w){
System.out.println(w.getMessage());
//returning the vector
return V_itemsJ;
i am getting a message in the dos prompt
a
b
c
no resultset was produced
it stops here
help and thanx
Since your output stops at "c", the error is occurring before printing "d". That is your line TPRO_J= P_TPRO.executeQuery();
Try changing your prepareCall like this:
CallableStatement P_TPRO = conOrcl.prepareCall("{call getJrecord ? }");
Note that the ? is not in parenthesis.
Similar Messages
-
Getting an error from calling a store proc
this is my code calling a store proc. i got all oracle 8i
drivers imported.
package FMISBean;
import java.sql.*;
import oracle.jdbc.driver.*;
public class getrecordj
public static void main(String [] args){
//global variables
Connection conOrcl=null;
String ProjectID ="222700-";
CallableStatement C_TPRO_J=null;
ResultSet R_TPRO_J = null;
try{
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
conOrcl=DriverManager.getConnection("jdbc:odbc:FMISORCL","FMIS_USER","FMIS123");
try{
String SQL ="{ ? = call getJrecord(?) }";
C_TPRO_J = conOrcl.prepareCall(SQL);
//assign the ? to the argument passed
C_TPRO_J.registerOutParameter(1,OracleTypes.CURSOR);
C_TPRO_J.setString(2,ProjectID);
//execute the query
C_TPRO_J.executeQuery();
R_TPRO_J = (ResultSet) C_TPRO_J.getObject(1);
//looping through the resultSet
while (R_TPRO_J.next()){
//create an instance of the class
// JavaBeans JItems = new JavaBeans();
// set it to the Bean
System.out.println(R_TPRO_J.getString(1));
System.out.println(R_TPRO_J.getString(2));
System.out.println(R_TPRO_J.getString(3));
System.out.println(R_TPRO_J.getString(4));
System.out.println(R_TPRO_J.getString(5));
System.out.println(R_TPRO_J.getString(6));
//JItems.setexistingLane(R_TPRO_J.getInt(3));
// JItems.setproposed_lane(R_TPRO_J.getInt(4));
// JItems.setcomnt(R_TPRO_J.getString(5));
// JItems.setcomntType(R_TPRO_J.getString(6));
//add the object to the vector
// V_itemsJ.addElement(JItems);
}catch(SQLException w){
System.out.println(w.getMessage());
}}catch(Exception S){
//returning the vector
// return V_itemsJ;
//closing bracets
the store proc works fine if i test it in sql plus but when i call it from the page i get a dos window error
[oracle][orant]:line 1, colunm 13
PLS: expression is of wrong type
line 1 , colunm 7
PL/SQL: statement ignored
any ideas please would help?Here are some examples to reference:
http://www.javaalmanac.com/egs/java.sql/CallFunction.html
http://www.javaalmanac.com/egs/java.sql/CallProcedure.html
DesQuite -
To convert the "IBM DB2 Store Procs written in C" to Oracle PL-SQL
Hi, Is it possible to convert the "IBM DB2 Store Procs written in C" to Oracle PL-SQL. If you have any info, PL do let me know. Thanks in advance.
EG :
/* SMG Stored Procedures */
/* DB2 Stored Procedure: OrganisationExists */
/* Linkage: SIMPLE (no NULLs permitted) */
/* Load module name: SMGEC00 */
/* Purpose: DELETE FROM SSE_LOOKUP_MAP */
/* to run. */
/* Parameters: argvÃ1¨ short - return error code - OUT */
/* argvÃ2¨ char - return error message - OUT */
/* argvÃ3¨ char - BLEID - IN */
/* Reason for edit Date Who */
/* Initial version 09/04/03 Arockia */
#pragma runopts(plist(os))
#include <stdlib.h>
#include <string.h>
void main (int argc, char *argvè)
EXEC SQL INCLUDE SQLCA;
EXEC SQL BEGIN DECLARE SECTION;
char bleid??(12??);
EXEC SQL END DECLARE SECTION;
/* Set defaults for error code (argvÃ1¨) and error message (argvÃ2¨) */
strcpy(argv??(2??)," ");
*(int *)argv??(1??) = 0;
strcpy(bleid,argv??(3??));
EXEC SQL
DELETE FROM SSE_LOOKUP_MAP
WHERE BLEID = :bleid;
/* Set error code to record status of last SQL command */
*(int *)argv??(1??) = SQLCODE;
return;For this program, you could do some thing like:
SQL> CREATE TABLE sse_lookup_map(BLEID varchar2(10));
Table created.
SQL> CREATE or replace PROCEDURE test(p_bleid_in IN varchar2)
2 AS
3 BEGIN
4 DELETE FROM sse_lookup_map
5 WHERE BLEID = p_bleid_in;
6 END;
7 /
Procedure created.
SQL> ed
Wrote file afiedt.buf
1* INSERT INTO sse_lookup_map values('test1')
SQL> /
1 row created.
SQL> ed
Wrote file afiedt.buf
1* INSERT INTO sse_lookup_map values('test2')
SQL> /
1 row created.
SQL> SELECT * FROM sse_lookup_map;
BLEID
test1
test2
2 rows selected.
SQL> EXEC test('test1')
PL/SQL procedure successfully completed.
SQL> SELECT * FROM sse_lookup_map;
BLEID
test2
1 row selected.
SQL> -
Getting data stored in ref cursor ( got from store proc in oracle) to excel sheet)
Hey, I am trying to Get data stored in ref cursor ( got from store proc in oracle) to excel sheet in a virtual folder using ssis.
I am getting errors and cant do it. If anyone can help meHi Nabin000,
The Oracle stored procedure doesn't work with SSIS source adapters such as OLE DB Source because the data provider doesn't provide metadata for the source adapter. To achieve your goal, you can use a Script Component as source to call
the Oracle stored procedure by using System.Data.OracleClient OracleDataReader, and get the rows and add them to the pipeline buffer. For more information, please see:
http://social.msdn.microsoft.com/Forums/sqlserver/en-US/1d0b3a1b-8792-469c-b0d1-f2fbb9e9ff20/dump-oracle-ref-cursor-into-ms-sql-staging-table-using-ssis
http://social.msdn.microsoft.com/Forums/sqlserver/en-US/fcdaa97e-8415-4c3e-8ffd-1ad45b590d57/executing-an-oracle-stored-procedure-from-ssis?forum=sqlintegrationservices
http://msdn.microsoft.com/en-us/library/system.data.oracleclient.oracledatareader(VS.90).aspx
Regards,
Mike Yin
TechNet Community Support -
IPad app store "unknown error" message when updating app
iPad app store "unknown error" message appears when updating app
Kathryn,
Had the problem also. Found in the forums and it worked for me:
go to settings
go to app store or "store" on my ipad
click on the apple id
sign out
sign in, again with id and password
then do update.
Hope this helps. -
Suddenly started receiving a error message when checking for updates in app store nsurlerrordomain error - 1012 how to fix?
Thanks Linc I will sit tight for a while to see what happens before chasing up customer service. Cheers.
-
Proc: error while loading shared libraries: libwtc9.so
Hi,
I have a server with RHAS 3.0, and installed 10g database and 10g Forms and Reports.
Now, I try to compile my ProC but I receive the following error:
"[sustore@teste01 src]$ ./comp_all
conv_scci.pc
conv_scci.pc
proc: error while loading shared libraries: libwtc9.so: cannot open shared object file: No such file or directory
make: *** [conv_scci] Error 127
COMPILE_ERROR IN conv_scci.pc
COMPILE_ERROR IN conv_scci.pc
help_eaf.pc
" etc...
Can anyone help me?
Thanks,
Carlosry to do this:
find / -name libwtc9.so
will be appear path where is placed this library
and/or without firts step define following ENV var:
if already declared LD_LIBRARY_PATH
export source LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:<path where is placed you library>
if not declared LD_LIBRARY_PATH
export source LD_LIBRARY_PATH=/usr/lib:/user/sbin/lib:<path where is placed you library> -
Keeping getting an error with-in the App Store. Error 100 saying that my payment can't be received at the time. I updated to Mountain Lion to download the new Logic Pro X. Now left with now recording software and it's not letting me buy the new one.
iMac, OS X Mountain Lion (10.8.4), trying to get Logic Pro XHello jst84,
The following article may be helpful in getting your purchase to complete.
Mac App Store: "An unknown error occurred (100)" when purchasing
http://support.apple.com/kb/TS3637
Cheers,
Allen -
Newstand in app purchase made in DPS is appearing in store with "error" below instead of the purchase price/download. Not sure why, as the product ID number matches up between itunesconnect and DPS. Any idea how to fix?
same here. this thread suggest that it's carrier related issue
http://supportforums.blackberry.com/t5/Payment-Service/Error-quot-The-Item-you-requested-is-invalid-...
Twitter: @gyubok -
Itunes store unknown error (-3212)
How do I resolve itunes store unknown error (-3212)?
Hi
But i am not able to remove this Mc Cafee from my PC.
Even i tried from Control Panel....
What must be the way to do it??
Plz suggest
<Email Edited By Host> -
can't access itunes store. no error message but store won't open at all. any ideas? thanks
i been trying to purchase music and get into my itunes account but error -1202 won't allow me to get into my account or purchase music. I spoken with the so called experts at apple and they've been putting me through the ringer with their suggestions that don't work. i've been purchasing music all before with no problems why all of a sudden this problem? Can someone please tell what to do or give any suggestions as to why this is occuring.
-
DropDown List Problem for Dynamic Store Proc Parameter in SAP B1 8.8
I am working with the crystal report 2008 in SAP B1 8.8 and the report is used the Store Proc for retrieving data. As i need to show a list of Documnet No (DOCNUM) from Sales Order (ORDR) and Purchase Order (OPOR) for the users to select, i use the Dynamic Parameter as for the Store Proc parameter (@Contno), However, the drop down list can be shown fine in Crystal Report, but cant be shown in "Report Selection Criteria" while opening the Crystal Report through SAP B1.
Therefore, can anyone tell me how to add the dynamic drop down list (cause the documnet no list will be changed very frequently) in the SAP B1 8.8 "Report Selection Criteria" screen.
Thanks!!Classic Crystal Reports and Classic SAP connectivity questions
Classic Crystal Reports and Classic SAP connectivity questions -
Pass parameters to sql store proc?
Is it possible to pass parameters from Crystal Report to sql store proc? I know it will prompt for paramters if the report is built based on a parameterized store proc. I am NOT talking about these parameters. I still want user to be able to select parameter values from dropdowns and use them as the procedure parameters.
Reason for my question is I don't want the store proc to create a table having all records then crystal makes report by filtering. The all-record table could grow huge very quickly as more data is put in.
Thank you very much.Hi Peter
Follow these steps:
A. Following steps applies to the main procedure:
1. Create a main report which accepts the same fields as you want to pass to the stored procedure. (Note that this main report is not based off the procedure that you want to execute. Just get the data that you want to pass to the procedure. We will call the procedure in the subreport.)
2. Now create the no. of dynamic parameters that you want your user to choose the data from in the main report. (Lets assume that the user will select a single value.)
B. Following section applies to the subreport:
1. Add a subreport to the main report. This subreport will be based off your procedure. This will automatically add up the stored procedure parameters to the subreport.
2. Take care that in the procedure you define the datatype of the parameters same as the field's data type that you want to pass to the procedure. This will show up your stored procedure parameters while subreport linking.
3. Now link the main report to the subreport with each parameter. Uncheck the "Select data based on" dialog box while linking each parameter.
Hope this post solves your problem. i am sorry for sounding descriptive.
Regards
Nikhil Sabnis -
Itunes store request error 4002? How to fixs it?
Try to connect to itunes match server but popup dialog box show "itunes store request error 4002"? How to fixs it?
See if this post fixes it, it seems to have done so for a number of users : https://discussions.apple.com/message/20443828#20443828
-
Issue with BPM while calling store proc
Hi All,
We are using BPM to execute/call the store procedure for look up. We are sending the correct request; bu we are not get the expected output form BPM during runtime. No issue with store proc ,we doudble checked
Is there any way to debug the BPM part of it. Plz advise Any bok or suggestion will be appreciated.
Thanks & Regards,
MohanIntegration Process monitoring:
https://www.sdn.sap.com/irj/scn/elearn?rid=/library/uuid/ab3f538e-0d01-0010-07b7-802c90b67eec&overridelayout=true
Regards,
Manjusha.
Maybe you are looking for
-
Questions about SRM PO in Classic scenario
Hello All I have a number of questions about the SRM PO in classic scenario. 1) If the Backend PO is changed in ECC i.e. if any quantity is added , can we have an approval workflow for the same? We currently have release strategies for other PO's in
-
I can't download the Adobe Flash 13.
Adobe Flash was downloaded 48% at the first and 50% at the second time, it were interrupped by Safari which was opened. Installer said "Please close Safari" I guess the Safari has been opened in the background or by soemone. I guess. I don't know
-
Adapter Metadata not present in SAP BASIS 7.00..
Hi Gurus, We hav installed PI 7.0 training server..we call it XIT...In SLD, SAP BASIS 7.00 is there in the s/w components.....but when i import it from SLD to IR its showing no objects presnet in it....specially i need http://sap.com/xi/XI/System
-
ODI Integration - Hyperion Planning inbound to GL
ODImates, I am designing a full integration (2 way-sided) from EBS-GL to Hyperion Planning and Hyperion Planning back to EBS-GL. The first side is almost finished, I extract the information from GL and create the specific format used by OTL Loader to
-
Hi Experts, I have created some tables & fields in my Addon. When i am running the code in SAP B1 8.8, some tables & fields are creating and some are not creating. it's throwing exception "The server threw an exception. (Exception from HRESULT: 0x800