Re: SQL...INSERT INTO / Quotes Problem

by "Cyanide _7" <leo7278(at)hotmail.com>

 Date:  Mon, 07 Feb 2000 15:39:58 CST
 To:  leo7278(at)hotmail.com
 Cc:  hwg-languages(at)hwg.org
  todo: View Thread, Original
sorry, missed an & in there.

"INSERT INTO MyTable (first, last)
        VALUES (""" & first & """, """ & last & """)"

this concatenates the variables first and last into the sql statement. the 
concept of representing double quotes in a string in asp may be easier to 
see with hard coded values:

"INSERT INTO MyTable (first, last) VALUES (""Jon"", ""Doe"")"

simply use double-double quotes. the escape slash \ is NOT a special 
character in ASP, its jsut itself. - Cyanide_7


>
>did you try double quotes? here is ASP
>
>"INSERT INTO MyTable (first, last)
>        VALUES (""" & first """, """ & last & """)"
>
>
>>From: "Shull, Conrad" <cshull(at)shscares.org>
>>To: "'hwg-languages(at)hwg.org'" <hwg-languages(at)hwg.org>
>>Subject: SQL...INSERT INTO / Quotes Problem
>>Date: Mon, 7 Feb 2000 11:19:55 -0500
>>MIME-Version: 1.0
>>Received: from [192.41.44.74] by hotmail.com (3.2) with ESMTP id
>>MHotMailBA683FFA00B0D820F399C0292C4A0DFA0; Mon Feb 07 08:39:01 2000
>>Received: (hwg2@localhost) by mail.hwg.org (8.8.5) id JAA07904; Mon, 7 Feb
>>2000 09:19:11 -0700 (MST)
>>Received: from hwg.org (hwg.org [192.41.18.106]) by mail.hwg.org (8.8.5) 
>>id
>>JAA07887; Mon, 7 Feb 2000 09:19:08 -0700 (MST)
>>Received: from is1-rac-mis.shscares.org (is1-rac-mis.shscares.org
>>[207.87.43.66]) by hwg.org (8.8.5) id JAA00618; Mon, 7 Feb 2000 09:19:04
>>-0700 (MST)
>>Received: by IS1-RAC-MIS with Internet Mail Service (5.5.2650.21)id
>><DZJHLV8C>; Mon, 7 Feb 2000 11:21:10 -0500
>>From owner-hwg-languages(at)mail.hwg.org Mon Feb 07 08:41:27 2000
>>Message-ID: <D1F975A17D9ED21185070008C756E9305A87AF@ntmail1>
>>X-Mailer: Internet Mail Service (5.5.2650.21)
>>Sender: owner-hwg-languages(at)hwg.org
>>Precedence: bulk
>>
>>I've seen several solutions to SELECT data from an Access database via ASP
>>when the string contains an apostrophe (typically a name like O'Toole), 
>>but
>>am stumped on how to get past the problem when using INSERT INTO.
>>
>>__________________________________
>>Conrad Shull
>>Information Technology Associate
>>Learning Resources Center
>>Susquehanna Health System
>>www.shscares.org
>>cshull(at)shscares.org
>>webmaster(at)shscares.org
>>570.321.2266
>
>______________________________________________________
>Get Your Private, Free Email at http://www.hotmail.com
>

______________________________________________________
Get Your Private, Free Email at http://www.hotmail.com

HWG: hwg-languages mailing list archives, maintained by Webmasters @ IWA