paragonfoods
asked on
Remove TAB character from SQL statement in ColdFusion 11 JDBC
In my coldfusion code, I have a standard cfquery statement with properly formatted SQL. This segment of code is tabbed (indented) in my page to make the code more readable. It seems that coldfusion is passing those TAB characters along in the SQL statement. This is not a problem via ODBC, but it causes a problem with the same database's JDBC driver. Is there a way to prevent or filter out the TAB charaters prior to passing the SQL to the database?
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
AFAIK, there's no extra "filtering" options for cfquery. CF simply evaluates whatever text is within the tags and sends it to the db. The best you could do is use a regex find/replace on the source, assuming your IDE offers that option.
Out of curiosity, what db are you using? I'm curious because I've always used tabs and it's never caused problems with sql server+jdbc.
Out of curiosity, what db are you using? I'm curious because I've always used tabs and it's never caused problems with sql server+jdbc.
ASKER
It's an older non-transactional database called DB/C FS. The ODBC driver works fine with my code as-is, but the JDBC driver is not liking the tabs. I think a JDBC wrapper that can reformat the SQL between CF and the DB is my next direction...
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER