Wrox Programmer Forums
|
ASP CDO As of Oct 5, 2005, this forum is now locked. No posts have been deleted. Please use "Classic ASP Professional" at: http://p2p.wrox.com/forum.asp?FORUM_ID=56 for discussions similar to the old ASP Pro Code Clinic or one of the other many remaining ASP and ASP.NET forums here.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP CDO section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old November 11th, 2004, 02:01 PM
Registered User
 
Join Date: Jun 2004
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Default ADO

I have a form in access where users submit there entries. There is one text(memo)field on the form. Whenever users use any types of apostrophes they receive an error. Is there a work around for this? see example below.

dim strtxtComments as string
dim db as databse
set db=currentdb

strtxtComments ="This is a test's"

strsql1 = "INSERT INTO tbl_Main_Quality (Comments)" & _
           "select" & "'" & strtxtComments & "'"
db.Execute (strsql1)

 
Old November 15th, 2004, 01:58 AM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 2,480
Thanks: 0
Thanked 1 Time in 1 Post
Default

Use Replace() vbscript function to replace all single quotes with double SINGLE QUOTES there.

That should solve this.
Cheers!

_________________________
- Vijay G
Strive for Perfection





Similar Threads
Thread Thread Starter Forum Replies Last Post
ADO explore_asp ADO.NET 2 August 20th, 2007 02:58 PM
ADO??? monabaumgartel BOOK: Beginning Access 2003 VBA 1 August 7th, 2007 05:44 PM
Difference between ADO and ADO.NET rakeshclose2u ADO.NET 2 April 23rd, 2007 03:57 AM
ADO AND ADO.NET royalsurej ADO.NET 1 November 8th, 2004 08:28 AM
ADO could ADO counot find the specified provider. Rob Collie Classic ASP Databases 2 June 9th, 2003 04:12 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.