Solved

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

Posted on 2001-08-26
2
212 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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
egit plugin on eclipse 8 98
Maven Project: Hibernate Dependencies Conflict 10 49
ejb mdb examples 1 19
How to fix  socket closed error 11 27
After being asked a question last year, I went into one of my moods where I did some research and code just for the fun and learning of it all.  Subsequently, from this journey, I put together this article on "Range Searching Using Visual Basic.NET …
In this post we will learn how to make Android Gesture Tutorial and give different functionality whenever a user Touch or Scroll android screen.
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 …
This tutorial covers a step-by-step guide to install VisualVM launcher in eclipse.

749 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