[Webinar] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

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

Posted on 2005-05-10
4
Medium Priority
?
1,973 Views
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);

try
{
 conn = ConnectionFactory.getConnection();
 ps = conn.prepareStatement(sql);
 ps.executeQuery();      
}

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
0
Comment
Question by:code_123
  • 2
  • 2
4 Comments
 
LVL 86

Accepted Solution

by:
CEHJ earned 135 total points
ID: 13967097
ps.executeUpdate();
0
 

Author Comment

by:code_123
ID: 13967173


Thank you !
0
 
LVL 86

Expert Comment

by:CEHJ
ID: 13967199
:-) but why a 'B'?
0
 

Author Comment

by:code_123
ID: 13967219


too late to change it now, soz !
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This was posted to the Netbeans forum a Feb, 2010 and I also sent it to Verisign. Who didn't help much in my struggles to get my application signed. ------------------------- Start The idea here is to target your cell phones with the correct…
In this post we will learn how to connect and configure Android Device (Smartphone etc.) with Android Studio. After that we will run a simple Hello World Program.
Viewers learn about the third conditional statement “else if” and use it in an example program. Then additional information about conditional statements is provided, covering the topic thoroughly. Viewers learn about the third conditional statement …
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 …
Suggested Courses
Course of the Month20 days, 11 hours left to enroll

865 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