?
Solved

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

Posted on 2001-08-26
2
Medium Priority
?
218 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 80 total points
ID: 6427613
Sorry!

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

should be

pstmt.setString(1, "You're right");
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

By the end of 1980s, object oriented programming using languages like C++, Simula69 and ObjectPascal gained momentum. It looked like programmers finally found the perfect language. C++ successfully combined the object oriented principles of Simula w…
Java functions are among the best things for programmers to work with as Java sites can be very easy to read and prepare. Java especially simplifies many processes in the coding industry as it helps integrate many forms of technology and different d…
Viewers learn about the “for” loop and how it works in Java. By comparing it to the while loop learned before, viewers can make the transition easily. You will learn about the formatting of the for loop as we write a program that prints even numbers…
This tutorial covers a step-by-step guide to install VisualVM launcher in eclipse.
Suggested Courses
Course of the Month11 days, 15 hours left to enroll

752 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