/*(c) Copyright IBM Corp. 2003 All rights reserved. */ /* */ /*This sample program is owned by International Business Machines */ /*Corporation or one of its subsidiaries ("IBM") and is copyrighted */ /*and licensed, not sold. */ /* */ /*You may copy, modify, and distribute this sample program in any */ /*form without payment to IBM, for any purpose including developing,*/ /*using, marketing or distributing programs that include or are */ /*derivative works of the sample program. */ /* */ /*The sample program is provided to you on an "AS IS" basis, without */ /*warranty of any kind. IBM HEREBY EXPRESSLY DISCLAIMS ALL */ /*WARRANTIES EITHER EXPRESS OR IMPLIED, INCLUDING, BUT NOT LIMITED TO*/ /*THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTIC-*/ /*ULAR PURPOSE. Some jurisdictions do not allow for the exclusion or */ /*limitation of implied warranties, so the above limitations or */ /*exclusions may not apply to you. IBM shall not be liable for any */ /*damages you suffer as a result of using, modifying or distributing */ /*the sample program or its derivatives. */ /* */ /*Each copy of any portion of this sample program or any derivative */ /*work, must include a the above copyright notice and disclaimer of */ /*warranty. */ /* */ /*********************************************************************/ /******************************************************************/ /* Populates the LOADTABLE with 30,000 Test Records */ /******************************************************************/ package com.ibm.jmetertest; import java.sql.*; public class JMeterPopulator { public static void main(String[] args) { try { Class.forName("COM.ibm.db2.jdbc.app.DB2Driver"); String dbName = "loaddb"; String url = "jdbc:db2:" + dbName; String userName = "db2admin"; String password = "db2admin"; Connection con = DriverManager.getConnection(url,userName, password); int numOfTestRecords = 30000; PreparedStatement statement = con.prepareStatement("INSERT INTO LOADTABLE VALUES(?,?,?)"); for (int i =0; i