New topic: SQL - ODBC - Escaping characters - double quotes.
<http://forums.realsoftware.com/viewtopic.php?t=47927> Page 1 of 1 [ 1 post ] Previous topic | Next topic Author Message superjacent Post subject: SQL - ODBC - Escaping characters - double quotes.Posted: Mon May 20, 2013 8:45 am Joined: Sat Oct 01, 2005 4:47 am Posts: 116 Location: Melbourne, Australia I'm writing SQL Update statements using ODBC to an Access database. I have the choice of enclosing the entire string value data in either single or double quotes. I'm preferring single quotes and so far so good. Within a string data value I can escape out an apostrophe (single quote) by doubling up with another apostrophe. When the Update statement is executed I can confirm by checking within the Access database the the update completed AND I only see a single quote; that is, the double single quote was stripped back to a single quote. This I like. I escape a double quote by preceding it with an escape backslash character "\". The Update statement is valid and after executing I check the result at the Access database. This time though I can see the escape character as part of the text. I'm not overly happy about this though I know upon retrieving the data I can un-escape the escape character. For testing purposes, rather than using the escape backslash character to escape double quotes, I doubled up on the double quotes and it made for a valid SQL Update statement. Again though, after execution, checking the data in Access the two double quotes are present. Yes, upon retrieval of the data the additional double quotes can be removed for display purposes. My query is firstly, is this the norm? Secondly, and more of an observation, if another application ie. Access, is retrieving that data by default the escape character (or additional double quotes) will be present. This doesn't seem quite right to me. Are there any other options available? _________________ Steve rs2012 r2.1 Windows 7. Top Display posts from previous: All posts1 day7 days2 weeks1 month3 months6 months1 year Sort by AuthorPost timeSubject AscendingDescending Page 1 of 1 [ 1 post ] -- Over 1500 classes with 29000 functions in one REALbasic plug-in collection. The Monkeybread Software Realbasic Plugin v9.3. http://www.monkeybreadsoftware.de/realbasic/plugins.shtml [email protected]
