Previous Thread
Next Thread
Print Thread
Apostrophe curse, replace not working #189942 04/27/05 03:34 PM
Joined: Apr 2005
Posts: 1
cha28 Offline OP
OP Offline
Joined: Apr 2005
Posts: 1
I'm writing an old school asp script to pull data from an Oracle 9i DB and insert it into an Access97 DB (long story), it works until it hits the dreaded Apostrophe, I've tried the Replace function with no luck, here's my code:

FieldTemp = oRs(9)
Field9 = Replace(FieldTemp,"'","''")

Here's the error:
Syntax error (missing operator) in query expression ''Bob O'MALLEY','1938131','2005','Q1', '4/27/2005 8:22:39 AM')'

(Data changed to protect the not so innocent)

I have keyboard indentations in my forehead...please help!


Re: Apostrophe curse, replace not working #189943 05/01/05 02:14 AM
Joined: Jan 2004
Posts: 22,776
Lisa LowCarb Offline
BellaOnline Editor
Highest Posting Power Known to Humanity
BellaOnline Editor
Highest Posting Power Known to Humanity
Joined: Jan 2004
Posts: 22,776
Try just two single apostrophes in a row, I think that's what Access uses ...

Lisa Shea, Low Carb and Video Games Editor
Low Carb Forum

Moderated by  Lisa LowCarb 

Brand New Posts
2020: On this day . . .
by Mona - Astronomy - 11/29/20 09:50 AM
Container Gardening TIP OF THE DAY
by Lestie4containergardens - 11/29/20 05:13 AM
Native American Heritage Month
by Angela - Drama Movies - 11/29/20 01:25 AM
Advent 2020
by Angie - 11/28/20 11:18 PM
Thanksgiving and Gratitude
by Angie - 11/28/20 01:36 PM
Meanwhile in Canada
by Angie - 11/28/20 01:34 PM
Thanksgiving in Space
by Angie - 11/28/20 01:30 PM
The Solar System - for Kids & Others
by Mona - Astronomy - 11/28/20 12:39 PM
Uranus - Facts for Kids *new article*
by Mona - Astronomy - 11/28/20 12:36 PM
Sewing Ideas Towards Best Fit
by Cheryl - Sewing Editor - 11/25/20 09:36 PM
This forum uses cookies to ensure smooth navigation from page to page of a thread. If you choose to register and provide your email, that email is solely used to get your password to you and updates on any topics you choose to watch. Nothing else. Ask with any questions!
Channel List
Beauty & Self
Books & Music
Food & Wine
Health & Fitness
Hobbies & Crafts
Home & Garden
News & Politics
Religion & Spirituality
Travel & Culture
TV & Movies
We take forum safety very seriously here at BellaOnline. Please be sure to read through our Forum Guidelines. Let us know if you have any questions or comments!

| About BellaOnline | Privacy Policy | Advertising | Become an Editor |
Website copyright © 2020 Minerva WebWorks LLC. All rights reserved.

Powered by UBB.threads™ PHP Forum Software 7.7.3