| Author |
How to get Password value from Connection
|
Ram Chhabra
Ranch Hand
Joined: Jan 07, 2008
Posts: 48
|
|
Hi, As per my code, i am connected to database successfully. Suppose i am having my connection object as con. Now, i just want some information about that connection in java code. I am able to get the url and username by the below code: But i am not able to fetch the value of password. Can you please tell me that how to get the value of password, which connection is using? Thanks, Ram
|
 |
Campbell Ritchie
Sheriff
Joined: Oct 13, 2005
Posts: 32830
|
|
Do a search through this forum; a similar topic came up about two weeks ago. I think we concluded it is impossible to extract a password with simple SQL.
|
 |
Jeanne Boyarsky
internet detective
Marshal
Joined: May 26, 2003
Posts: 26496
|
|
Ram, In the discussion Campbell refers to, we had some back and forth about why one would need the password. If you say what you are trying to accomplish, someone might be able to give you an alternate approach.
|
[Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Blogging on Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, OCAJP, OCPJP beta, TOGAF part 1 and part 2
|
 |
Brian Mozhdehi
Ranch Hand
Joined: Aug 17, 2006
Posts: 81
|
|
You are not able to do this because the API doesnt allow it - being able to do so would pose a security risk to the associated application. I presume you have the password already otherwise you wouldnt be able to connect in your code?
|
 |
 |
|
|
subject: How to get Password value from Connection
|
|
|