"How can you quote binary data? "
how else can you tell the query where the data begins and ends inside the statement?
"And how do you escape special characters in it?"
addslashes() 🙂
although MS-SQL probably requires a different method, like the single quote or something.
"What is a special character in binary data anyway? It isn't characters"
Characters aren't characters either, the are binary data that point to characters in the ASCII table. Thus you can print binary data just like you can print text, it just looks like your cat did a polka on a chinese keyboard.
The problem is that binary data can contain bytes of all values (0-255) and some of those values point to control characters such as EOF, EOL, enter, newline, quote etc. These must be escaped so SQL interprets them as the values they represent, and not the control function they have inside the query string.
A forum, a FAQ, email notification, what else do you need?