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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T02:48:30+00:00 2026-06-08T02:48:30+00:00

My concept is that I have to select an item in first combobox. It

  • 0

My concept is that I have to select an item in first combobox. It will add up some items to the second combo box, based on the selection. Once, the second combobox is selected, then some access table data is retrieved.

Finally, when I click Delete, the record has to get deleted based on the item present in the two combo box.

I get the record correctly deleted. But, my problem is, I’m getting an error dialog(which I used in catch) everytime with a

No resultset produced

error in the command prompt, though the deletion happens correctly. I want to know, what’s going on inside. Kindly help me diagnose.

try
{

  Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
  Connection conn=DriverManager.getConnection("jdbc:odbc:vasantham","","");
  Statement st=conn.createStatement();
  ResultSet rs=st.executeQuery("delete from try where tname='"+scb+"' and   Purpose='"+scp+"'");

  JOptionPane.showMessageDialog(null,"Your entry has been DELETED successfully!!!");

}
catch(Exception e)
{
  JOptionPane.showMessageDialog(null,"Error!Try again!");
  System.out.println(e);

}
  • 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-08T02:48:31+00:00Added an answer on June 8, 2026 at 2:48 am

    You are using st.executeQuery which has to be used with selects, as only selects create a ResultSet. You are using an UPDATE query, which will not produce a ResultSet hence the error.

    In your case you need to use executeUpdate

    int result = st.executeUpdate(...)
    

    The result will contain the number of your deleted (updated) rows.

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

Sidebar

Related Questions

I have a table called concept-relation that contains 3 columns (relationID, firstConceptID, secondConceptID) I
I need to add an element to my website that will allow me to
I have an xml document with the following structure: <?xml version=1.0 encoding=UTF-8?> <items> <item>
I have the following SQL query: SELECT DISTINCT business_key FROM Memory WHERE concept <>
I'm working on building an HTTPHandler that will serve up plain text for use
I have a function that is used as an INSERT trigger. This function deletes
I have a question regarding the concept of contextual action bar. The Android Design
I'm developing an app that should allow the client to add several content sections
I have model with a Foreign Key to itself like this: class Concept(models.Model): name
I have to create a DSL for non-programmers (customers of our company) that needs

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.