Firebird SQL Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me

The Shed is going Social! Join us on FaceBook and Twitter and chime in on the conversation.

Go Back   Dev Shed ForumsDatabasesFirebird SQL Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old May 14th, 2011, 05:17 PM
c_guven c_guven is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: May 2011
Posts: 2 c_guven User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 40 m 36 sec
Reputation Power: 0
How to insert double quote (") char into record

Hi everybody,

I'm using Delphi and Firebird 2.5 and trying to add a string field just saying 3" (3 inches) but could not do so far. I tried many possibilities such as:
:= '3'+#34 //no good
:= ''3"'' //single,single+3+ double, single - no good either.
etc. but no success.
if I enter two double quotes in a string then it's ok though.
Any help would be greatly appreciated.

cengiz

Reply With Quote
  #2  
Old May 14th, 2011, 05:19 PM
shammat shammat is offline
Contributing User
Dev Shed Frequenter (2500 - 2999 posts)
 
Join Date: Oct 2003
Location: Germany
Posts: 2,685 shammat User rank is Captain (20000 - 30000 Reputation Level)shammat User rank is Captain (20000 - 30000 Reputation Level)shammat User rank is Captain (20000 - 30000 Reputation Level)shammat User rank is Captain (20000 - 30000 Reputation Level)shammat User rank is Captain (20000 - 30000 Reputation Level)shammat User rank is Captain (20000 - 30000 Reputation Level)shammat User rank is Captain (20000 - 30000 Reputation Level)shammat User rank is Captain (20000 - 30000 Reputation Level)shammat User rank is Captain (20000 - 30000 Reputation Level) 
Time spent in forums: 1 Month 3 Weeks 3 Days 19 h 59 m 5 sec
Reputation Power: 284
You didn't show us your real SQL statemtent, but the following works for me:

Code:
INSERT INTO some_table (some_column)
VALUES
('3"');
If you put your code between [code] tags as well, the differences between single and double quotes are easily visible.

Reply With Quote
  #3  
Old May 15th, 2011, 06:02 AM
c_guven c_guven is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: May 2011
Posts: 2 c_guven User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 40 m 36 sec
Reputation Power: 0
This is very strange; I tried your code and did not on the work first time, later I changed the order of fields (accidentally) and it worked! I mean:

s1:= '3"';
s:= Format('INSERT INTO DUMY (ADate,AText) '+
'VALUES (AT1,''%s'')', [s1]);

this is ok but if I just change order and go like:

s:= Format('INSERT INTO DUMY (AText,ADate) '+
'VALUES (''%s'',AT1)', [s1]);

then I get :
"AT" Not found Error. I need to add text field at the end. Anyway it's working now, and your answer helped me a lot to dig out the problem. Thank you very much.

cengiz

Reply With Quote
Reply

Viewing: Dev Shed ForumsDatabasesFirebird SQL Development > How to insert double quote (") char into record

Developer Shed Advertisers and Affiliates



Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 


Powered by: vBulletin Version 3.0.5
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.

© 2003-2013 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap