java documentation говорит:
A character preceded by a backslash (\) is an escape sequence and has special meaning to the compiler. The following table shows the Java escape sequences:
- \t Insert a tab in the text at this point.
- \b Insert a backspace in the text at this point.
- \n Insert a newline in the text at this point.
- \r Insert a carriage return in the text at this point.
- \f Insert a formfeed in the text at this point.
- \' Insert a single quote character in the text at this point.
- \" Insert a double quote character in the text at this point.
- \\ Insert a backslash character in the text at this point.
Ваша строка соединения имеет обратную косую черту, поэтому Java ожидает последовательность выхода и \ R не является (Illegal маскирующим).
Таким образом, вы должны обратный слеш и строка подключения должна выглядеть следующим образом:
"jdbc:sqlserver://JOSEAN\\REGULUS;databasename = BD12272"
Вы получаете ошибку? что именно вы подразумеваете под «не имея результатов»? – msturdy
Если вы действительно делаете это в JSP, просто ... не делайте этого. – GreyBeardedGeek