| JDBCDatabase.getSchemas returns an empty list! [message #597894] |
Mon, 23 August 2010 05:44 |
|
Originally posted by: hillner.informatik.uni-leipzig.de
Hi all,
my problem is that I need to create an instance of any Database object
(f.i. a JDBCDatabase) for further usage.
F.i. I need to fetch all schemas from the database (and exactly this is
the problem).
Currently I'm creating the database as follows:
DB2SimpleDataSource source = new DB2SimpleDataSource();
source.setServerName(server);
source.setDriverType(4);
source.setPortNumber(port);
source.setDatabaseName(dbName);
source.setUser(userName);
source.setPassword(password);
try {
Connection connection = source.getConnection();
database = new JDBCDatabase(connection);
} catch (SQLException e) {
e.printStackTrace();
}
I can work with the connection without problems but when I try to use
the database (f.i. to get the schemas) it seems that the object wasn't
properly initialized. Since this is an EMF object, I thought there must
be a factory class anywhere to create a database object but I didn't
find one.
Thanks,
Stanley
|
|
|
Powered by
FUDForum. Page generated in 0.04664 seconds