This week's book giveaway is in the JDBC forum.
We're giving away four copies of Make it so: Java DB Connections & Transactions and have Marcho Behler on-line!
See this thread for details.
The moose likes JDBC and Relational Databases and the fly likes System.getProperty() rejects logon Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Make it so: Java DB Connections & Transactions this week in the JDBC forum!
JavaRanch » Java Forums » Databases » JDBC and Relational Databases
Bookmark "System.getProperty() rejects logon" Watch "System.getProperty() rejects logon" New topic

System.getProperty() rejects logon

Jennifer Sohl
Ranch Hand

Joined: Feb 28, 2001
Posts: 455
Hi. I have been running my app by connecting to a MSSQL database using a log on of "Master" and no password. It has been working great.
Now I have created a userID in SQL that is my NT logon (jsohl). I want to use this to log in to the database. I can use WindowsNT authentication in Query Analyzer and it works.
So, in my app, I replaced "master" with System.getProperty("")
and it keeps rejecting the log on. Why??
(In SQL server, I have my logon defined to used WindowsNT authentication. It works with SQL server authentication?)
Here's my code:

What am I doing wrong?
Thanks for any help!
[ November 25, 2002: Message edited by: Jennifer Sohl ]
Tina Coleman
Ranch Hand

Joined: Dec 12, 2001
Posts: 150
Do a System.out.println on the property to verify that you're sending your name. If your app is actually operating within a web server, then the username used will be different, I believe. Also, you're not sending through a password. . .
I agree. Here's the link:
subject: System.getProperty() rejects logon
jQuery in Action, 3rd edition