MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

sql code -518 as the string contains quotes

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Database
View previous topic :: View next topic  
Author Message
Rama_Prayaga
Beginner


Joined: 20 May 2003
Posts: 45
Topics: 15

PostPosted: Wed Jul 20, 2005 10:08 am    Post subject: sql code -518 as the string contains quotes Reply with quote

Hi,

My program has Dynamic SQLs.

I am receiving SQL code -518 sometimes,

The reason while passing the string contains quotes, in between them.

like
MC Donald's resturant

As the data will be always dynamic....How should I Handle such cases.


Regards,
Rama Krishna Prayaga.
Back to top
View user's profile Send private message Yahoo Messenger
schintala
Beginner


Joined: 18 May 2005
Posts: 108
Topics: 31
Location: USA

PostPosted: Wed Jul 20, 2005 12:18 pm    Post subject: Reply with quote

I see below info from sql 518. Do you have any of these.

-518 THE EXECUTE STATEMENT DOES NOT IDENTIFY A VALID PREPARED STATEMENT

Explanation: One of the following conditions exists:

o The statement named in the EXECUTE statement has not been prepared.

o The statement named in the EXECUTE statement identifies a SELECT,
VALUE INTO, or statement.

o The statement named in the EXECUTE IMMEDIATE statement identifies a
SELECT, VALUE INTO, or statement.

Programmer Response: Ensure that you prepare the statement prior to
EXECUTE. Also, ensure that the statement you prepare is not a SELECT or
VALUES INTO statement.
Back to top
View user's profile Send private message
Rama_Prayaga
Beginner


Joined: 20 May 2003
Posts: 45
Topics: 15

PostPosted: Wed Jul 20, 2005 1:32 pm    Post subject: Reply with quote

Hi schintala,

Yes My EXECUTE STATEMENT is not PREPARED because of the the strings which have quotes( ' ) (EXample:
MC Donald's resturant )
in them.How should I handle such situations is my problem now.

Regards,
Rama Krishna Prayaga
Back to top
View user's profile Send private message Yahoo Messenger
Dummy
Beginner


Joined: 03 Jan 2003
Posts: 8
Topics: 1

PostPosted: Tue Aug 02, 2005 1:30 pm    Post subject: Reply with quote

Can you try using two continous single quotes instead of one? This works (considered as one quote) in few places.

Are you using a place holder or Iteral value?
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Database All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group