Hi-
I wrote an app years ago using jsp, and life has been good, it just
hummed along quietly passing the password and username in the
connection string ex:
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
Connection con =
DriverManager.getConnection("jdbc:odbc:old_way","user_name","pass_word");
Statement stmt = con.createStatement();
ResultSet rs = stmt.executeQuery("SELECT * FROM blah blah blah....");
now we have a new database that needs windows authentication.
I built a new ODBC data source using the new server and windows
authentication and it connects fine. (lets call it new_way)
QUESTION: How do I code the new ODBC source?
("jdbc:odbc:new_way","user_name","pass_word");
("jdbc:odbc:new_way","","");
("jdbc:odbc:new_way");
all above give me the following error:
javax.servlet.ServletException: [Microsoft][ODBC SQL Server Driver]
[SQL Server]Login failed for user '(null)'. Reason: Not associated
with a trusted SQL Server connection.
HELP!
Thanks in advance
dharper@research.umass.edu
Arne Vajhøj - 25 Feb 2007 19:18 GMT
> I wrote an app years ago using jsp, and life has been good, it just
> hummed along quietly passing the password and username in the
[quoted text clipped - 22 lines]
> [SQL Server]Login failed for user '(null)'. Reason: Not associated
> with a trusted SQL Server connection.
http://support.microsoft.com/kb/313100
Quote:
"The Microsoft SQL Server 2000 driver for JDBC does not support
connecting by using Windows NT authentication. You must set the
authentication mode of your SQL Server to Mixed mode, which permits both
Windows Authentication and SQL Server Authentication."
Arne