开发者

How to add SQL on multiple lines in - SQL.properties file

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.


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.


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

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜