weird problem with JSP and postgresql
I'm running postgresql 8.1.3 on tomcat 5.5.7, and using the postgresql-8.1-404.jdbc3.jar JDBC driver, and I'm having a very weird exception that pretty much doesn't explain anything, and so I was hoping someone could help me with it.
I have certain values stored in a bean, and then I'm uploading a picture from my PC to the server and storing info in the database. The code is the following:
103: Connection con=DriverManager.getConnection("jdbc:postgresql://localhost:5432/db","user", "pass");
104: Statement st=con.createStatement();
105:
106: int rs = st.executeUpdate("INSERT INTO news (news_title, news_body, news_author_name, image1) values ('"+title+"', '"+body+"', '"+author+"', '"+filename+"')");
107:
108:
109: if (rs > 0)
And the exception is the following:
org.postgresql.util.PSQLException: ERROR: syntax error at or near "s"
This occurs at line 106.
Does anyone have any idea what the problem is and how to fix it?
Thank you.

