/**export table data in DB2 database to MS Access XP database |
*@param schemaName |
assign the source data table's schema, null means that table is owned by current user |
*@param tableName |
assign the source table name |
*@param targetDatabase |
assign the destination database, in general, you want to export table data to a access database. In fact, you can assign any legal jdbc url no the prefix part(jdbc:access:/), so, c:/tmp/a.mdb, c:/tmp/xx.zip/b.mdb, ////192.168.10.2/sharedir/aa.mdb, //domain.com:3099/c:/data/bb.mdb all can assigned to this parameter, more about this information, please see the document. |
*@param targetTableName |
assign the destination table name which you want to exported to it |
*@param targetConnProps |
assign the conntion properties, please split multi properties by ';' ,for example, username=abc;password=abc |
*/ |
|
public static void exportTableToAccessXP(String schemaName, String tableName, String targetDatabase, String targetTableName, String targetConnProps) |
|
/**export table data to MS Access 2002 database*/ |
public static void exportTableToAccess2002(String schemaName, String tableName, String targetDatabase, String targetTableName, String targetConnProps) |
|
/**export table data to MS Access 2000 database */ |
public static void exportTableToAccess2000(String schemaName, String tableName, String targetDatabase, String targetTableName, String targetConnProps) |
|
/**export table data to MS Access 2003 database */ |
public static void exportTableToAccess2003(String schemaName, String tableName, String targetDatabase, String targetTableName, String targetConnProps) |
|
/**export table data to MS Access 95 database */ |
public static void exportTableToAccess95(String schemaName, String tableName, String targetDatabase, String targetTableName,String targetConnProps) |
|
/**export table data to exportTableToAccess97 database */ |
public static void exportTableToAccess97(String schemaName, String tableName, String targetDatabase, String targetTableName, String targetConnProps) |
|
|
/**export SQL query result data to MS Access XP database |
*@param query |
assign the SQL query |
*@param targetDatabase |
assign the destination database, in general, you want to export table data to a access database, so this parameter name is targetDatabase, but in fact, you can assign any legal jdbc url no the prefix part(jdbc:access:/), so, c:/tmp/a.mdb, c:/tmp/xx.zip/b.mdb, ////192.168.10.2/sharedir/aa.mdb, //domain.com:3099/c:/data/bb.mdb all can assigned to this parameter, more about this information, please see the document. |
*@param targetTableName |
assign the destination table name which you want to exported to it |
*@param targetConnProps |
assign the conntion properties, please split multi properties by ';' ,for example, username=abc;password=abc |
*/ |
|
public static void exportQueryToAccessXP(String query, String targetDirectory, String targetTableName, String targetConnProps) |
|
/**export SQL query result data to MS Access 2002 database*/ |
public static void exportQueryToAccess2002(String query, String targetDatabase, String targetTableName, String targetConnProps) |
|
/**export SQL query result data to MS Access 2000 database */ |
public static void exportQueryToAccess2000(String query, String targetDatabase, String targetTableName, String targetConnProps) |
|
/**export SQL query result data to MS Access 2003 database */ |
public static void exportQueryToAccess2003(String query, String targetDatabase, String targetTableName, String targetConnProps) |
|
/**export SQL query result data to MS Access 95 database */ |
public static void exportQueryToAccess95(String query, String targetDatabase, String targetTableName,String targetConnProps) |
|
/**export SQL query result data to exportTableToAccess97 database */ |
public static void exportQueryToAccess97(String query, String targetDatabase, String targetTableName, String targetConnProps) |
|
|
com.hxtt.data.export.advance.ConnectionGetter.setConnection(yourConnection);
com.hxtt.data.export.advance.DB22Access.exportTableToAccess2000(null,"ATABLE","c:/tmp/a.mdb","BTABLE",null);
You just supply a DB2 database connection , and then call
the method. We will release this connection after complete a export operation
for we want to avoid holding a reference to the connection . So, if you want
continue execute other export operation, you should recall the setConnection
method, for example, the code follows export two table to the target.
com.hxtt.data.export.advance.ConnectionGetter.setConnection(yourConnection);
com.hxtt.data.export.advance.DB22Access.exportQueryToAccessXP("select * from ATABLE A,BTABLE B WHERE A.ID=B.ID","c:/tmp/a.mdb","BTABLE",null); |