• Post Reply Bookmark Topic Watch Topic
  • New Topic

User and Password  RSS feed

 
Kang Wang
Greenhorn
Posts: 18
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

Is it absolutely necessary to specify a user and password when opening a connection?

Thanks
 
Paul Sturrock
Bartender
Posts: 10336
Eclipse IDE Hibernate Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If your DB requires it.
 
Jeanne Boyarsky
author & internet detective
Sheriff
Posts: 37392
531
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Kang,
Yes, but you don't necessarily need to know what it is. If you are using a datasource, the person setting it up can know the password and encrypt it. For a regular connection, using DriverManager, you must know the password.

And welcome to JavaRanch!
 
Sam Sun
Ranch Hand
Posts: 60
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Don't need user and password if the database don't have. Some example use like this
DriverManager.getConncetion("jdbcerbyB");

It's ok also.

[edited to disable smilies]
[ April 20, 2005: Message edited by: Jeanne Boyarsky ]
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!