//Class.forName("COM.ibm.db2.jdbc.app.DB2Driver"); //Class.forName("COM.ibm.db2.jdbc.net.DB2Driver"); //Class.forName("com.ibm.db2.jcc.DB2Driver"); //连接例子可以相同,都是指定主机,端口和数据库名称 String dbUrl ="jdbc:db2://localhost:6789/sample"; con = DriverManager.getConnection(dbUrl,"www","123456"); |
# Properties file for java xml samples # Created on Nov 3, 2004 # Description: file containing the value that automate the execution and testing of functions #rollbackCommit=rollback #interactive=yes # Modify the following according to your machine log in hostName=localhost portNumber=50000 password=lys databaseName=SAMPLE userName=Administrator # Modify the following to test different situations #purchaseOrder_id=1020 #pID=100-101-01 fileName=F:\eclipse\WorkPlace\DB2XML\src\p5.xml |