Member Login

Username
Password
Forget Password
New Sign Up
Search Forum

Buy Support
Incidents

If you can't find your answer in the FREE PUBLIC QDeveloper Forum, require URGENT Priority Support, or you need to send us private or confidential information:

Click Here
If you can't login and post questions or you are having trouble viewing forum posts:
Click Here
Callback
Support

If you live in USA, UK, Canada, Australia or New Zealand, you can leave us details on your question and request us to call you back and discuss them with you personally  (charges apply).

Click Here
 
Buy Support
Incidents
If you can't find your answer in the FREE PUBLIC QDeveloper Forum, require URGENT Priority Support, or you need to send us private or confidential information:
Click Here

Forum : How do I escape special characters?Search Forum

Forum Home > QODBC - ODBC Driver for QuickBooks > QODBC v9 Forum

 New Topic 
 
 Post Reply 
[1]  
 How do I escape special characters? 
 Author   Message 
  orders 
  
 Group: Members 
 Posts: 3 
 Joined: 2008-07-16 
 Profile
 Posted : 2008-10-26 09:17:37
I am trying to look-up a customer using the following:

SELECT * FROM Customer WHERE FullName = 'O'Brien, J'

This of-course fails due to the apostrophe in the name I have tried various escape sequences as folow:

FullName = 'O'''Brien, J'
FullName = 'O\'Brien, J'
FullName = 'O\\'Brien, J'
FullName = "O'Brien, J'

Any help would be greatly appreciated. 

  Top 
  Tom 
  6c3c1_sdk-qodbc.gif
 Group: Administrator 
 Posts: 5510 
 Joined: 2006-02-17 
 Profile
 Posted : 2008-10-26 10:14:34

The normal solution is to replace each single quote with two consecutive single quotes.

SELECT * FROM Customer WHERE FullName = 'O''Brien, J'

See: How do I use single quotes within a quoted string? 

 

  Top 
 New Topic 
 
 Post Reply 
[1]  

Jump to