Subject Re: [Firebird-Java] Re: FBUserManager
Author Steven Jardine
mirom_2005 wrote:

>Yes, that's what I meant.
>
>Ok, I see, my description was't good enough ;-)
>
>But how can I use the FBUserManager with my connection parameter. The
>constructor of FBUserManager need the GDSType and I don't understand
>how this parameter is to use with my connection. And so I asked for a
>little example to use it.
>
>
Here is an example. GSTType can be PURE_JAVA, NATIVE, or EMBEDDED.
Other examples can be found in the TestFBUserManager class.

try {

UserManager userManager = new
FBUserManager(GDSType.getType("PURE_JAVA"));
userManager.setHost("localhost");
userManager.setUser("sysdba");
userManager.setPassword("masterkey");
userManager.setDatabase("c:/database/broker.gdb");

Map users = userManager.getUsers();

Iterator iterator = users.values().iterator();

while (iterator.hasNext())
System.out.println(iterator.next());

} catch (Exception e) {

e.printStackTrace();

}