Advertisement

08.07.2006 at 03:30AM PDT, ID: 21945394
[x]
Attachment Details
[x]
The Solution Rating System

With so many solutions, how can you tell which solutions are most likely to help you and which ones are not? To provide you with a tool to use, we rate our solutions based on various elements that most accurately determine if a solution is a quality solution. To explain what factors affect the solution rating, here are the elements we take into consideration when formulating our solution rating.

  • The Grade of the Solution
  • The Zone Rank of the Expert Providing the Solution
  • The Number of Author and Expert Comments
  • The Number of Experts Contributing
  • The Feedback of the Community

Your Input Matters
Because of the way the system is set up, the most important variable in this equation is you. As a member of Experts Exchange, you are able to cast your vote on the quality of the solutions in regard to how complete, accurate, helpful and easy to understand each solution is. When you provide your feedback, each rating is adjusted accordingly. So, if you see a solution that has a poor rating that you think is a good solution, let us know by rating it. As you do, the rating will be adjusted and will become more accurate for other members of our site.

If you have any suggestions that you would like to make for our rating system, please ask a question in the Suggestions Zone of Community Support.

Thank you!

4.6

URGENT: stored procedures for Oracle using Java not working.

Asked by manish_regmi in Java Programming Language

Tags: , , ,

Hi how can i create a stored procedure using JDBC.

The procedure is like this
create or replace procedure new_Victim
(
CaseID IN Number,
FormNo IN Number,
Name  IN  Varchar2,
WardNo  IN Number,
VDC IN Varchar2,
Location IN Varchar2,
District IN Varchar2,
Zones IN Varchar2,
Region IN Varchar2,
Gender IN Varchar2,
Age IN Number,
Caste IN Varchar2,
Education IN Varchar2,
SubEducation IN Varchar2,
Classs IN Number,
Economy IN Varchar2,
Family IN Number,
Occupations IN Varchar2,
Designation IN Varchar2,
Affected IN Number,
Whodidcase IN Varchar2,
Typess IN Varchar2,
SubTypes IN Varchar2,
Description IN Varchar2,
Remrk IN Varchar2,
Status IN Varchar2,
SubStatus IN Varchar2,
Bigsix IN Varchar2,
Sources IN Varchar2,
Quantity IN Number,
Datee IN Varchar2,
Period IN Varchar2,
Marital IN Varchar2,
CaseType IN Varchar2,
PerpetatorID IN Number
)

is
DistrictID Number;
ZoneID Number;
RegionID Number;
casteID Number;
EducationID Number;
SubEducationID Number;
EconomyID Number;
OccupationID Number;
DesignationID Number;
WHOID Number;
TypeID Number;
SubTypeID Number;
SourceID Number;
StatusID Number;
SubStatusID Number;
BigSixID Number;
LocationID Number;
PeriodID Number;
RowCount Integer;

Begin

  Select DISTID into DistrictID from DISTRICT where DISTNAME = District ;
 
  Select ZONEID into ZoneID from ZONE where ZONENAME = Zones ;
 
  Select REGIONSID into RegionID from REGIONS where REGIONSNAME = Region ;
 
  Select CASTEID into casteID from CASTE where CASTEDESCRIPTION = Caste ;
 
  Select EDUID into EducationID from EDUCATIONALSTATUS where EDUDESCRIPTION = Education ;
 
  Select EDUSUBID into SubEducationID from EDUCATIONALSUBSTATUS where EDUSUBDESCRIPTION = SubEducation ;
 
  Select ECONOMICSTATUSID into EconomyID from ECONOMICSTATUS where ECONOMICSTATUSDESCRIPTION = Economy;
 
  select count(*) into RowCount from OCCUPATION where OCCUPATIONDESCRIPTION = Occupations ;
  If RowCount > 0 then
        Select OCCUPATIONID into OccupationID from OCCUPATION where OCCUPATIONDESCRIPTION = Occupations ;
  Else
        OccupationID :=0;
  End if;
 
  select count(*) into RowCount from OCCUPOSITION where OCCUPOSITIONDESCRIPTION = Designation ;
  If RowCount > 0 then
        Select OCCUPOSITIONID into DesignationID from OCCUPOSITION where OCCUPOSITIONDESCRIPTION = Designation ;
  Else
          DesignationID :=0;
  End if;
 
  Select DIDTHECASEID into WHOID from DIDTHECASE where DIDTHECASEDESCRIPTION = Whodidcase ;
 
  Select CASESOURCEID into SourceID from CASESOURCE where CASESOURCEDESCRIPTION = Sources;
 
  Select HEADAUTOID into TypeID from HEADINGS where HEADDESCRIPTION = Typess;  
 
  Select SUBHEADAUTOID into SubTypeID from SUBHEADINGS where SUBHEADDESCRIPTION = SubTypes;
 
  select count(*) into RowCount from VICTIMSTATUS where VICTIMSTATUSDESCRIPTION = Status;
  If RowCount > 0 then
        Select VICTIMSTATUSID into StatusID from VICTIMSTATUS where VICTIMSTATUSDESCRIPTION = Status;
   Else
            StatusID :=0;
  End if;
 
  select count(*) into RowCount from VICTIMSTATUSSUBHEAD where VICTIMSTATUSSUBHEADDESCRIPTION = SubStatus  and  VICTIMSTATUSHEADID = StatusID;
  If RowCount > 0 then
        Select VICTIMSTATUSSUBHEADID into SubStatusID from VICTIMSTATUSSUBHEAD where VICTIMSTATUSSUBHEADDESCRIPTION = SubStatus  and  VICTIMSTATUSHEADID = StatusID;
   Else
        SubStatusID :=0;
  End if;
  Select BIG6ID into BigSixID from BIG6 where BIG6DESCRIPTION = BigSix ;
 
  Select LOCATIONAUTOID into LocationID from LOCATION where  LOCATIONDESCRIPTION = Location ;      
 
  Select PERIODID into PeriodID from PERIOD where PERIODDESCRIPTION = Period ;  
 

  insert into TESTTABLE(PRCASENO,PRFORMNO,PRNAME,PRLOCATION,PRWARDNO,PRPRVDCMCP,PRDISTRICT,PRZONE,PRREGION,PRGENDER,PRAGE,
                        PRCAST,PREDUCATIONID,PRSUBEDUCATIONID,PRCLASS,PRECONOMICSTATUS,PROCCUPATION,
                        PRDESIGNATION,PRAFFECTEDNO,PRDIDTHECASE,PRKILLINGSTYPE,PRKILLINGSSUBTYPE,PRCASESOURCE,
                        PRREMARKS,
                        PRCASEDESCRIPTION,PRVICTIMSTATUS,PRVICTIMSTATUSSUBTYPE,PRBIG6,PRCASEQTY,
                        PRDATE,PRPERIOD,PRMARITALSTATUS,PRCASETYPE,PRPERPNO) values
                        (CaseID,FormNo,Name,LocationID,WardNo,VDC,DistrictID,ZoneID,RegionID,Gender,Age,casteID,
                        EducationID,SubEducationID, Classs,EconomyID,OccupationID,DesignationID,Affected,WHOID,
                        TypeID,SubTypeID,SourceID,Remrk,Description,StatusID,SubStatusID,BigSixID,Quantity,
                        to_date(Datee||'00:00:00','mm/dd/yyyyHH24:mi:ss'),PeriodID,Marital,CaseType,PerpetatorID);
      
                         
  commit;
/*EXCEPTION
WHEN NO_DATA_FOUND THEN
      newID := -1;*/

End;

I am just puting that in string and doing

String procperp = "the above long procedure";
try{
      Statement stmt = conn.createStatement();
      stmt.executeUpdate(procperp);
}
catch(SQLException e)
{
      e.printStackTrace();
}
            

But the procedure is not working. What am i missing?
Is there a newline issue?

regards
Manish Regmi

Start Free Trial
 
Loading Advertisement...
 
[+][-]08.07.2006 at 03:32AM PDT, ID: 17262494

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]08.07.2006 at 03:33AM PDT, ID: 17262498

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]08.07.2006 at 03:43AM PDT, ID: 17262544

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]08.07.2006 at 03:45AM PDT, ID: 17262548

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]08.07.2006 at 03:46AM PDT, ID: 17262551

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]08.07.2006 at 03:47AM PDT, ID: 17262558

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]08.07.2006 at 03:48AM PDT, ID: 17262563

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]08.07.2006 at 03:50AM PDT, ID: 17262570

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]08.07.2006 at 03:50AM PDT, ID: 17262575

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]08.07.2006 at 03:52AM PDT, ID: 17262588

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]08.07.2006 at 03:57AM PDT, ID: 17262614

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]08.07.2006 at 04:02AM PDT, ID: 17262651

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]08.07.2006 at 04:19AM PDT, ID: 17262766

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]08.07.2006 at 04:41AM PDT, ID: 17262925

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]08.07.2006 at 04:49AM PDT, ID: 17262999

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]08.07.2006 at 06:00AM PDT, ID: 17263306

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]08.07.2006 at 06:19AM PDT, ID: 17263422

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]08.07.2006 at 06:20AM PDT, ID: 17263428

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]08.07.2006 at 06:24AM PDT, ID: 17263456

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]08.07.2006 at 06:40AM PDT, ID: 17263590

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]08.07.2006 at 03:07PM PDT, ID: 17267453

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]08.07.2006 at 09:31PM PDT, ID: 17268816

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]08.07.2006 at 10:19PM PDT, ID: 17268964

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]08.08.2006 at 01:46AM PDT, ID: 17269676

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]08.25.2006 at 06:36PM PDT, ID: 17394019

Experts Exchange has a courteous staff of administrators who help members get the most out of the website by means of administrative comments like this one.

Start your 7-day free trial to view this Administrative Comment or ask the Experts your question.

 
[+][-]08.30.2006 at 02:54PM PDT, ID: 17424511

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zone: Java Programming Language
Tags: oracle, stored, procedure, java
Sign Up Now!
Solution Provided By: CetusMOD
Participating Experts: 6
Solution Grade: B
 
 
 
Loading Advertisement...
20081112-EE-VQP-42