File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes JDBC 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 Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Databases » JDBC
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
Similar Threads
NT user
Registry Values
JDBC Remote DB Connection
get the currently logged user(urgent)
problem with connecting to a SQLServer database