Hi All, So I mentioned this in a previous mail, but the issue has cropped up for me again. A few days ago when I was trying to store a blob in a MySQL database I came across the quoteAndEscapeText() function in org.jakarta.torque.util.SqlExpression. I get the impression that this method is called to check strings for escape characters before performing SELECTs. It is not called during inserts or updates, since these use prepared statements.
This method appears to replace all single quotes with two single quotes, and depending on the database, replace a backslash with two backslashes. In my attempts to store the blob in a mysql database with torque I was helpfully directed to this page: http://www.mysql.com/doc/S/t/String_syntax.html which seems to suggest that additional escape characters are required for mysql strings (such as backslash double quote) and also for mysql blobs (like backslash NUL). Even having made adjustments to take all this into account I was foiled in my efforts to store blobs in MySQL and gave up and encoded the data in base64. Today I was running some tests on MSSQL that previously worked, and now fail with single quotes in select statements, presumably because I moved all the escape sequencing over to MySQL format. Wouldn't it be a good idea for Torque to handle more variation in the escape sequences used by different databases? Or am I overlooking some other part of the code that handles this? Thanks in advance. CHEERS> SAM -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
