• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 2111
  • Last Modified:

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

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
code_123
Asked:
code_123
  • 2
  • 2
1 Solution
 
CEHJCommented:
ps.executeUpdate();
0
 
code_123Author Commented:


Thank you !
0
 
CEHJCommented:
:-) but why a 'B'?
0
 
code_123Author Commented:


too late to change it now, soz !
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Cloud Class® Course: Microsoft Office 2010

This course will introduce you to the interfaces and features of Microsoft Office 2010 Word, Excel, PowerPoint, Outlook, and Access. You will learn about the features that are shared between all products in the Office suite, as well as the new features that are product specific.

  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now