+ Reply to Thread
Results 1 to 4 of 4

ADO JET SQL: How to escape [

  1. #1
    Registered User
    Join Date
    03-11-2021
    Location
    india
    MS-Off Ver
    365
    Posts
    46

    ADO JET SQL: How to escape [

    Hello,

    I've been escaping reserved characters in my SQL statements by repeating them, but am finding that in some cases the repeated character is stored in the database and then retrieved later.

    For example, if I add the file name This [is] Testing's.txt to a string field, I'd usually escape it by passing This [[is]] Testing''s.txt

    If I don't do this I get an SQL error, but I've found that This [[is]] Testing''s.txt is actually being stored and then returned in later queries.
    I tried using a \ to escape as in some SQL versions, but this doesn't seem to work in ADO


    Update.
    I found that I was running my escape function too many times which explained the '' apearing in the data.
    I'm still finding it difficult to escape the [ character without two of them being stored in data.
    Last edited by Mingeita; 02-07-2022 at 08:29 AM.

  2. #2
    Registered User
    Join Date
    03-11-2021
    Location
    india
    MS-Off Ver
    365
    Posts
    46

    Re: ADO JET SQL: How to escape [

    Is no way to escape [ or have I posted in wrong section?

  3. #3
    Forum Expert rorya's Avatar
    Join Date
    08-13-2008
    Location
    East Sussex, UK
    MS-Off Ver
    2016 primarily
    Posts
    7,230

    Re: ADO JET SQL: How to escape [

    You shouldn't need to escape that when writing to a Jet database.
    Rory

  4. #4
    Registered User
    Join Date
    03-11-2021
    Location
    india
    MS-Off Ver
    365
    Posts
    46

    Re: ADO JET SQL: How to escape [

    Ohhhh! That explains it.
    Thank you so much.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. [SOLVED] Escape Key not working
    By Howardc1001 in forum Excel General
    Replies: 3
    Last Post: 06-18-2021, 11:54 PM
  2. VBA - Escape characters for square bracket
    By Cheesecube in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 04-09-2020, 11:29 AM
  3. [SOLVED] How do I escape brackets?
    By dflak in forum ExcelTip.com Feedback / Comments / Suggestions
    Replies: 9
    Last Post: 12-28-2015, 07:36 AM
  4. Disable Escape Key
    By foncesa in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 03-12-2014, 05:51 PM
  5. Merging between escape characters
    By Peleus in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 09-08-2011, 10:00 AM
  6. Escape key for '
    By icemantj in forum Access Tables & Databases
    Replies: 1
    Last Post: 01-15-2010, 09:10 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1