Reputation: 63
JEE Project - Separating SQL from code: I have SQL in my sql.properties file like this .. on 4 lines.
emp_sql=select * \
from employees \
where \
name = 'JON'
The loader sees only first line - rest of the lines are being ignored. what am I doing wrong. thanks.
Upvotes: 1
Views: 2086
Reputation: 434
If you keep the properties file as xml then this multiline issue wont arise. You should use loadFromXML method of java.util.Properties. Please note that this feature is available only from 1.5. Check out the following link
Upvotes: 0
Reputation: 86774
Check to make sure there are no blanks after the \
backslashes at the end of each line. A blank in the position cancels the effect of the backslash.
Upvotes: 3