Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8927383
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T08:12:48+00:00 2026-06-15T08:12:48+00:00

When I run the below program it producing the errors can any tell me

  • 0

When I run the below program it producing the errors can any tell me the solution for this
I need to pass the data to my database using the parameters in method InsTable :

 import java.io.*;
 import java.sql.*;
 import java.util.*;
public class InsertusrProf
{
public static Connection prepareConnection()throws ClassNotFoundException,SQLException
{
    String dcn="oracle.jdbc.driver.OracleDriver";
    String url="jdbc:oracle:thin:@JamesPJ-PC:1521:skypark";
    String usname="system";
    String pass="tiger";
    Class.forName(dcn);
    return DriverManager.getConnection(url,usname,pass);
}
public static void InsTable(String uname,String photo1,String video1,String    music1,String notes1,String messages1,String link,String frd,String cmt,String lik,String     ulik,String shrs,String qst,String answ,String updt,String thms,String wrd,String comm,String grp,String pgs,String ntfcn,String rqst,String tps,String tg)throws ClassNotFoundException,SQLException,FileNotFoundException
{
    StringBuilder sb=new StringBuilder(1024);;
    sb.append("insert into ").append(uname).append("(PHOTO,VIDEO,MUSIC,NOTES,MESSAGES,LINKS,FRIENDS,COMMENTS,LIKES,UNLIKES,SHARES,QSTNS,ANS,UPDATES,THEMS,WORDS,LANGUAGES,RELEGION,PRIVACY,HOBBIES,FAV,QULIFICATION,COMMUNITIES,GRPS,PAGES,NOTIFICATION,REQUESTS,TIPS,CITY,TAG)values(?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)");
    String stmnt=sb.toString();
    Connection con=prepareConnection();
    PreparedStatement ps=con.prepareStatement(stmnt);
    ps.setString(1,uname);

    File fl=new File(photo1);
    FileInputStream fis=new FileInputStream(fl);
    ps.setBinaryStream(2,fis,(int)fl.length());

    File fl1=new File(music1);
    FileInputStream fis1=new FileInputStream(fl1);
    ps.setBinaryStream(3,fis1,(int)fl1.length());

    File fl2=new File(video1);
    FileInputStream fis2=new FileInputStream(fl2);
    ps.setBinaryStream(4,fis2,(int)fl2.length());

    File fl3=new File(shrs);
    FileInputStream fis3=new FileInputStream(fl3);
    ps.setBinaryStream(12,fis3,(int)fl3.length());

    File fl4=new File(updt);
    FileInputStream fis4=new FileInputStream(fl4);
    ps.setBinaryStream(15,fis4,(int)fl4.length());

    File fl5=new File(notes1);
    FileReader fr=new FileReader(fl5);
    //BufferedReader r=new BufferedReader(notes1.getCharacterStream());
    ps.setCharacterStream(5,fr,(int)fl5.length());

    File fl6=new File(messages1);
    FileReader fr1=new FileReader(fl6);
    ps.setCharacterStream(6,fr1,(int)fl6.length());

    ps.setString(7,link);

    ps.setString(8,frd);

    File fl7=new File(cmt);
    FileReader fr2=new FileReader(fl7);
    ps.setCharacterStream(9,fr2,(int)fl7.length());

    ps.setString(10,lik);

    ps.setString(11,ulik);

    File fl8=new File(qst);
    FileReader fr3=new FileReader(fl8);
    ps.setCharacterStream(13,fr3,(int)fl8.length());

    File fl9=new File(answ);
    FileReader fr4=new FileReader(fl9);
    ps.setCharacterStream(14,fr4,(int)fl9.length());

    ps.setString(16,thms);

    File fl0=new File(wrd);
    FileReader fr5=new FileReader(fl0);
    ps.setCharacterStream(17,fr5,(int)fl0.length());

    ps.setString(18,comm);

    ps.setString(19,grp);

    ps.setString(20,pgs);

    File fls=new File(ntfcn);
    FileReader fr6=new FileReader(fls);
    ps.setCharacterStream(21,fr6,(int)fls.length());

    ps.setString(22,rqst);

    File fls1=new File(tps);
    FileReader fr7=new FileReader(fls1);
    //BufferedReader r=new BufferedReader(tps.getCharacterStream());
    ps.setCharacterStream(23,fr7,(int)fls1.length());

    ps.setString(24,tg);

    int i=ps.executeUpdate();

    System.out.println("<<<<<<<Record Inserted Successfully>>>>>>> Count :"+i);

    con.close();
}
public static void main(String args[])throws Exception
{
    String uname="james";
    String photo1="C:/Users/James P J/Documents/javaprog/img1.jpg";
    String video1="C:/Users/James P J/Documents/javaprog/How To Make 3D Text In Photoshop (ADOBE PHOTOSHOP CS6 TUTORIAL).flv";
    String music1="C:/Users/James P J/Documents/javaprog/Lelepadi.mp3";
    String notes1="C:/Users/James P J/Documents/javaprog/test.java";
    String messages1="C:/Users/James P J/Documents/javaprog/test.java";
    String link="aaaaa";
    String frd="bbbb";
    String cmt="C:/Users/James P J/Documents/javaprog/test.java";
    String lik="asadssfds";
    String ulik="zxzxxzcx";
    String shrs="C:/Users/James P J/Documents/javaprog/img1.jpg";
    String qst="C:/Users/James P J/Documents/javaprog/test.java";
    String answ="C:/Users/James P J/Documents/javaprog/test.java";
    String updt="C:/Users/James P J/Documents/javaprog/img1.jpg";
    String thms="bgfvdft";
    String wrd="C:/Users/James P J/Documents/javaprog/test.java";
    String langs="erdgdfgf";
    String rlgn="bngfhgfh";
    String prvc="zxcsdw";
    String hbs="bgnbvc";
    String fvt="tgfhfghjfgh";
    String qlf="mklkopi";
    String comm="mbnfchgeshgw";
    String grp="bgyeadb";
    String pgs="hfhfj";
    String ntfcn="C:/Users/James P J/Documents/javaprog/test.java";
    String rqst="ghfhgfh";
    String tps="C:/Users/James P J/Documents/javaprog/test.java";
    String cty="jjkhgjghjk";
    String tg="qwewr";
    InsTable(uname,photo1,video1,music1,notes1,messages1,link,frd,cmt,lik,ulik,shrs,qst,answ,updt,thms,wrd,comm,grp,pgs,ntfcn,rqst,tps,tg);
}
  }

I tried to solve this error by making the mode as IN OUT in procedure what i created
But the following error was not solved if any solution find please answer for it.
The Error was :

 Exception in thread "main" java.sql.SQLException: Missing IN or OUT parameter at
 index:: 25
    at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java
:112)
    at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java
:146)
    at oracle.jdbc.driver.OraclePreparedStatement.processCompletedBindRow(Or
 aclePreparedStatement.java:1681)
    at oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePrep
 aredStatement.java:3280)
    at oracle.jdbc.driver.OraclePreparedStatement.executeUpdate(OraclePrepar
 edStatement.java:3368)
    at skypark.InsertusrProf.InsTable(InsertusrProf.java:99)
    at skypark.InsertusrProf.main(InsertusrProf.java:138)
 Press any key to continue . . .

Please answer this if you know the solution….
Thanks in advance…

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-15T08:12:49+00:00Added an answer on June 15, 2026 at 8:12 am
    java.sql.SQLException: Missing IN or OUT parameter at
     index:: 25
    

    Means, your ps.set.... not matching with number of ?

    You have total 30 ? but only 24 ps.Set…. statements.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm using Netbeans. When I run the program below, I get this as output
When I run the below program I am getting the following errors: (any ideas?)
As you can see below, I have Parallel.For loop. If run the program while
I have run this program below with a symbol_list of a few hundreds symbol
consider the program below char str[5]; strcpy(str,Hello12345678); printf(%s,str); When run this program gives segmentation
This program below when run does not halt. I don't think I made a
trying to run the program below but am getting an error when using the
In this multithreading program, when I run it, I always get the output in
Why does the program listed below run on mac osx and linux but not
I used Netbeans IDE to compile and run the below program. public class Unicode

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.