org.postgresql.util.PSQLException: No results were returned by the query

Posted on 2005-05-10
Last Modified: 2012-06-27
Hi all

I'm inserting values into a table using the following

String sql = "INSERT INTO table VALUES(a,b,c,d,e);

 conn = ConnectionFactory.getConnection();
 ps = conn.prepareStatement(sql);

I'm not expecting any resulst as this is an insert, and the vlues are inserted into the table correctly, but i get an error
org.postgresql.util.PSQLException: No results were returned by the query

Can anyone help me out with this

Many Thanks
Question by:code_123
    LVL 86

    Accepted Solution


    Author Comment


    Thank you !
    LVL 86

    Expert Comment

    :-) but why a 'B'?

    Author Comment


    too late to change it now, soz !

    Featured Post

    How to improve team productivity

    Quip adds documents, spreadsheets, and tasklists to your Slack experience
    - Elevate ideas to Quip docs
    - Share Quip docs in Slack
    - Get notified of changes to your docs
    - Available on iOS/Android/Desktop/Web
    - Online/Offline

    Join & Write a Comment

    INTRODUCTION Working with files is a moderately common task in Java.  For most projects hard coding the file names, using parameters in configuration files, or using command-line arguments is sufficient.   However, when your application has vi…
    For beginner Java programmers or at least those new to the Eclipse IDE, the following tutorial will show some (four) ways in which you can import your Java projects to your Eclipse workbench. Introduction While learning Java can be done with…
    Video by: Michael
    Viewers learn about how to reduce the potential repetitiveness of coding in main by developing methods to perform specific tasks for their program. Additionally, objects are introduced for the purpose of learning how to call methods in Java. Define …
    Viewers learn about the scanner class in this video and are introduced to receiving user input for their programs. Additionally, objects, conditional statements, and loops are used to help reinforce the concepts. Introduce Scanner class: Importing…

    729 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    17 Experts available now in Live!

    Get 1:1 Help Now