Hello,
i try to change username and password dynamically within code.
But it don't work and i'm tired of trying.
Can someone please explain me, what i'm doing wrong?
Hibernate version: 3.2.6.ga
Code:
Configuration cfg = new AnnotationConfiguration().configure( );
cfg.setProperty( "connection.username", pUsername );
cfg.setProperty( "connection.password", pPassword );
cfg.buildSessionFactory().openSession();
That should work, or? But when opening teh connection i get an exception:
Quote:
Access denied for user ''@'localhost' (using password: NO)
Thanks in regard.