But how can I connect the DB2 without databasename? I use follow lines to connect DB2. url = "jdbc:db2:databasename"; DriverManager.getConnection( url, userId, password );
【在 xt 的大作中提到】 : : I don't think you can do that unless you are logged on : as the DB2 administrator.
xt
4 楼
You cannot connect to a DB2 database without database name. I believe DB2 JDBC does offer features to create databases. You need to look into their JDBC documentation, if they do publish.
【在 c*******t 的大作中提到】 : : But how can I connect the DB2 without databasename? : I use follow lines to connect DB2. : url = "jdbc:db2:databasename"; : DriverManager.getConnection( url, userId, password );