SunQuest
 
           SQL Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
 
User Name:
Password:
Remember me
Go Back   ASP Free ForumsDatabaseSQL 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 ASP Free Forums Sponsor:
Get inside! Sample the range of functionality easily built with JMSL Library for Time Series Data Analysis, Heat Maps, Portfolio Optimization, Monte Carlo Simulation, Stock Price Charting and more. Download Now!
  #1  
Old June 5th, 2000, 03:55 PM
Steve Schofield Steve Schofield is offline
Contributing User
ASP Free God 20th Plane (14500 - 14999 posts)
 
Join Date: Dec 2002
Posts: 14,578 Steve Schofield User rank is Corporal (100 - 500 Reputation Level)Steve Schofield User rank is Corporal (100 - 500 Reputation Level)Steve Schofield User rank is Corporal (100 - 500 Reputation Level)Steve Schofield User rank is Corporal (100 - 500 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 22
sinqle quotes in SQL statements

<i><b>Originally posted by : PCalabria (PCalabria@pcenterprises.com)</b></i><br />I'm trying to update a character field in my access database with a string that contains a sinqle quote. VB sript doesn't mind the quote at all, strBookList="Pat's", but when I try to add the line to an SQL UPDATE statement, all hell breaks loose because strings need to be surrounded with single quotes.

Reply With Quote
  #2  
Old June 6th, 2000, 03:31 AM
Steve Schofield Steve Schofield is offline
Contributing User
ASP Free God 20th Plane (14500 - 14999 posts)
 
Join Date: Dec 2002
Posts: 14,578 Steve Schofield User rank is Corporal (100 - 500 Reputation Level)Steve Schofield User rank is Corporal (100 - 500 Reputation Level)Steve Schofield User rank is Corporal (100 - 500 Reputation Level)Steve Schofield User rank is Corporal (100 - 500 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 22
<i><b>Originally posted by : Jason</b></i><br /><br />use this to replace all single quotes, so sql will not think that it's the start or end of a value constant. <br />strBookList = replace(strBookList,"'","''")<br /><br />------------<br />PCalabria at 6/5/2000 1:55:43 PM<br /><br />I'm trying to update a character field in my access database with a string that contains a sinqle quote. VB sript doesn't mind the quote at all, strBookList="Pat's", but when I try to add the line to an SQL UPDATE statement, all hell breaks loose because strings need to be surrounded with single quotes.

Reply With Quote
Reply

Viewing: ASP Free ForumsDatabaseSQL Development > sinqle quotes in SQL statements


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 | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 4 hosted by Hostway