Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

com.RuntimeCollective.webapps.dbtools
Class JDBCupload  view JDBCupload download JDBCupload.java

java.lang.Object
  extended byGenericDataSource
      extended bycom.RuntimeCollective.webapps.dbtools.JDBCupload

public class JDBCupload
extends GenericDataSource

Reads an sql file and uploads it to an sqlserver database.

Version:
$Id: JDBCupload.java,v 1.8 2003/09/30 15:13:13 joe Exp $

Constructor Summary
JDBCupload()
           
 
Method Summary
static void main(java.lang.String[] argv)
          Source an sql file to a database.
static java.util.Enumeration parseFile(java.lang.String filename)
           
static java.lang.Object[][] queryRows(java.lang.String sql, JDBCupload instance, java.sql.Connection conn)
          Execute a SQL query and return all the results.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JDBCupload

public JDBCupload()
Method Detail

main

public static void main(java.lang.String[] argv)
Source an sql file to a database.

The following command line parameters can be specified, in order:

  • filename: filename containing SQL statements to execute
  • url: URL for database connection
  • driver: name of the JDBC driver class
  • user: user name of the tablespace
  • password: password for the tablespace (if blank, omit)


parseFile

public static java.util.Enumeration parseFile(java.lang.String filename)
                                       throws java.lang.Exception

queryRows

public static java.lang.Object[][] queryRows(java.lang.String sql,
                                             JDBCupload instance,
                                             java.sql.Connection conn)
                                      throws java.sql.SQLException
Execute a SQL query and return all the results.