Solved

ERROR: parser: parse error at or near "re"

Posted on 2001-08-26
2
213 Views
Last Modified: 2010-05-18
hi Experts,

I've an update statement that does - update scene set text = 'You're right' where id = 196 and ref = 10017;

My sql statement:
sql = "update scene set text = '"+c_text+"' where id = "+c_id+" and ref = "+c_ref+";";

My error:
ERROR: parser: parse error at or near "re"

Please offer ur suggestions on how should I update a text with a ' symbol in my word - You're. Thanks.

Dawn.


0
Comment
Question by:Dawn_rico
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
2 Comments
 
LVL 6

Expert Comment

by:kotan
ID: 6427610
try to update in this method,

sql = "update scene set text = ? where id = " + ...

PreparedStatement pstmt = con.preparedStatement(sql);
pstmt.setString("You're right");

0
 
LVL 6

Accepted Solution

by:
kotan earned 20 total points
ID: 6427613
Sorry!

pstmt.setString("You're right");

should be

pstmt.setString(1, "You're right");
0

Featured Post

[Webinar] Code, Load, and Grow

Managing multiple websites, servers, applications, and security on a daily basis? Join us for a webinar on May 25th to learn how to simplify administration and management of virtual hosts for IT admins, create a secure environment, and deploy code more effectively and frequently.

Question has a verified solution.

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

Suggested Solutions

Java Flight Recorder and Java Mission Control together create a complete tool chain to continuously collect low level and detailed runtime information enabling after-the-fact incident analysis. Java Flight Recorder is a profiling and event collectio…
Go is an acronym of golang, is a programming language developed Google in 2007. Go is a new language that is mostly in the C family, with significant input from Pascal/Modula/Oberon family. Hence Go arisen as low-level language with fast compilation…
Viewers learn how to read error messages and identify possible mistakes that could cause hours of frustration. Coding is as much about debugging your code as it is about writing it. Define Error Message: Line Numbers: Type of Error: Break Down…
This theoretical tutorial explains exceptions, reasons for exceptions, different categories of exception and exception hierarchy.
Suggested Courses

737 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