Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » DTP » JDBCDatabase.getSchemas returns an empty list!
JDBCDatabase.getSchemas returns an empty list! [message #597894] Mon, 23 August 2010 05:44
Eclipse User
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
Previous Topic:Obtaining Foreign Keys via ODA connections and IResultSet?
Next Topic:JDBCDatabase.getSchemas returns an empty list!
Goto Forum:
  


Current Time: Sat Aug 23 11:39:47 EDT 2014

Powered by FUDForum. Page generated in 0.01475 seconds