1:如果数据库为db2,则你所要查找的表前面要加上这个建表的用户名,
如,testTable这张表,我是通过系统登陆的帐号所建,为lixc.testTable;
db2的jdbc连接用法:
1. 将 db2jcc.jar 和 db2jcc_license_cu.jar 配置在环境变量classpath下。
2. 将 db2jcc.jar 和 db2jcc_license_cu.jar复制在你所用的应用服务器中工程下的WEB-INF/lib包下
3. JDBC URL :jdbc:db2://tdurden:50000/SAMPLE
( where tdurden is the machine the DB2 database server resides on and where SAMPLE is the database instance - 50000 is the default DB2 port to connect to )
4. Driver Class field: com.ibm.db2.jcc.DB2Driver
5. Add a valid username and password in the username and password fields.