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 8586713
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T22:22:40+00:00 2026-06-11T22:22:40+00:00

I have form as below. ++++++++++++++++++++++++++++++++++++++++++++++++++ + Id : TextBox + + Name :

  • 0

I have form as below.

++++++++++++++++++++++++++++++++++++++++++++++++++
+   Id     :  TextBox                            +
+   Name   :  TextBox                            +
+   Mob    :  TextBox                            +
+   Photo  :  File Option                        +
+                                                +
+   Submit   Update                              +
++++++++++++++++++++++++++++++++++++++++++++++++++

What I want to do is update the data for the respective Id. For update I have query as below.

PreparedStatement pst = conn.prepareStatement("UPDATE myTable SET name=?, mob=?, photo=? WHERE id=?");
pst.setString(1, personName);
pst.setString(2, mobileNum);
pst.setBinaryStream(3, InputStreamData);
pst.setString(4, personId);
pst.executeUpdate();

I have problem. I will explain with scenario.

Suppose id is 1 and I already have data for personName & file. Now I enter mobile number only. . How could I avoid pst.setBinaryStream(4, InputStreamData); statement? I don’t want to enter any data as data is already present. Is there any sql statement where I can insert data.

I can pre-populate only Name data BUT NOT file data.

Edit 1

Solution for this is, have many UPDATE statements. BUT the problem is I have many fields. I can’t use so many UPDATE statements.

Edit 2

What I tried is read the photo data & set that data in setBinaryStream as below.

pst.setBinaryStream(4, rst.getBinaryStream(1));

But it give me ERROR as

java.lang.AbstractMethodError: com.mysql.jdbc.PreparedStatement.setBinaryStream(ILjava/io/InputStream;)V

javax.faces.el.EvaluationException: java.lang.AbstractMethodError: com.mysql.jdbc.PreparedStatement.setBinaryStream(ILjava/io/InputStream;)V
at javax.faces.component.MethodBindingMethodExpressionAdapter.invoke(MethodBindingMethodExpressionAdapter.java:102)
at com.sun.faces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:102)
at javax.faces.component.UICommand.broadcast(UICommand.java:315)
at javax.faces.component.UIViewRoot.broadcastEvents(UIViewRoot.java:794)
at javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:1259)
at com.sun.faces.lifecycle.InvokeApplicationPhase.execute(InvokeApplicationPhase.java:81)
at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:101)
at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:118)
at javax.faces.webapp.FacesServlet.service(FacesServlet.java:593)
at org.apache.catalina.core.StandardWrapper.service(StandardWrapper.java:1542)

—

Caused by: java.lang.AbstractMethodError: com.mysql.jdbc.PreparedStatement.setBinaryStream(ILjava/io/InputStream;)V
at com.sac.databean.PersonalInformationDataBean.editPersonalInfo(PersonalInformationDataBean.java:1530)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at javax.el.BeanELResolver.invokeMethod(BeanELResolver.java:779)
at javax.el.BeanELResolver.invoke(BeanELResolver.java:528)
at javax.el.CompositeELResolver.invoke(CompositeELResolver.java:257)
  • 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-11T22:22:41+00:00Added an answer on June 11, 2026 at 10:22 pm

    pst.setBinaryStream(4, rst.getBinaryStream(1), (int) rst.getString(1).length()); did the trick.

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

Sidebar

Related Questions

I have a few asp:textbox controls in a form on a webpage, below is
I have a form with the following HTML below: <form id=course_edit_form name=course_form action=/courses/save method=post>
I have a form which has a input textbox and submit button. On submission
i have a input elements as below <form method=post > 1 <input type=text name=passname[name]
I have below form written in mvc3 razor. I want to display a message
I have the form like below <form id=myform class=form-horizontal class=collapse in> <fieldset> <!-- form
I have this form tag below where the form submits to itself which I
I have a table with a form below it. You can fill out the
I have just started to develop the form below and I have the following
I have a basic unordered list with an input field/form below it. I would

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.