JDBC Type 4 Driver 1.1 Programmer's Reference
throws java.io.FileNotFoundException, java.io.IOException
{
int numBytes;
int recKey;
long start;
long end;
Connection conn1 = null;
// Set t4slqmx.blobTableName System Property. This property
// can also be added to the command line through
// "-Dt4slqmx.blobTableName=...", or a
// java.util.Properties object can be used and passed to
// getConnection.
System.setProperty( "t4slqmx.blobTableName","cat.sch.blobdatatbl" );
if (args.length < 2) {
System.out.println("arg[0]=; arg[1]=file; arg[2]=");
return;
}
// byte array for the blob
byte[] whatever = new byte[5000];
for (int i=0; i<5000; i++) whatever[i] = 71; // "G"
String k = "K";
for (int i=0; i<5000; i++) k = k + "K";
System.out.println("string length = " + k.length());
java.io.ByteArrayInputStream iXstream
= new java.io.ByteArrayInputStream(whatever);
numBytes = iXstream.available();
if (args.length == 3)
numBytes = Integer.parseInt(args[2]);
recKey = Integer.parseInt(args[0]);
System.out.println("Key: " + recKey +"; Using "
+ numBytes + " of file " + args[1]);
try {
Class.forName("com.tandem.t4jdbc.SQLMXDriver");
start = System.currentTimeMillis();
//url should be of the form:
// jdbc:t4sqlmx://ip_address|machine_name:port_number/:”
String url = “jdbc:t4sqlmx://mymachine:6000/:”;
conn1 = DriverManager.getConnection(url);
System.out.println("Cleaning up test tables...");