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.
Bookmarks