|FAQ for Text2DB2 Packages|
|The most recent version of this document can be viewed at here.|
|Table of Contents|
| 1. General Questions
2. EMBED Package Questions
|1. How to know the detailed version information
of Text2DB2 package?
check that MANIFEST.MF file in jar file.
|2. Can I use it in an iSeries OS/400 IBM machine
that has Java 1.4 running in it?
The Text2DB2 packages can run on any platform with Java VM, which includes Microsoft Windows, Novell Netware, OS2, UNIX, and LINUX. It supports Personal Java, JDK1.0.X, JDK1.1.X, JDK1.2.X, JDK1.3.X, JDK1.4.X and JDK1.5.X. It supports JDBC1.2, JDBC2.0, and JDBC3.0 now.
|3. What is difference between the Text2DB2
Package, Embedded(WithDrv) Package, Embedded(WithoutDrv) Package?
The Text2DB2 Package is a GUI application , and the Embedded package is a package which can load into DB2 database(DB2 8 or upper). If you're exporting data by GUI application or a configuration file, you should use the Text2DB2 Package . If you want to export data more quickly and more flexibly, you can use the Text2DB2 Embedded Package.
As the tips by the name, Embedded(WithDrv) Package contains the HXTT Text JDBC package, and Embedded(WithoutDrv) Package doesn't.
|4. What's the difference between the
professional Text2DB2 Package and the enterprise Text2DB2 Package?
The standard Text2DB2 Package can export table data to DB2 from CSV(TSV, PSV).
The enterprise Text2DB2 Package contains the function of standard Text2DB2 Package, besides, it can export data accord view or a dynamic query, and execute export operation from a configuration file saved by prior export operation, and loaded into DB2 database(DB2 8 or upper) for build a procedure to export data.
|5. What causes the 'No suitable driver' SQLException?
This error usually occurs during a call to DriverManager.getConnection(). The cause can be failing to load the appropriate JDBC driver before calling getConnection(), or specifying an invalid JDBC URL that isn't recognized by your JDBC driver. If you are exporting data by GUI application or a configuration file, you should check the DB2 JDBC package exists in the directory in your driver config, and check your JDBC url. If you are using Embedded(WithoutDrv) Package to export data in DB2 database, this error happens is because you haven't load the HXTT Text JDBC package in DB2 database.
|6. What's the diffirence between the HXTT Text
JDBC package contained in DataExp 2007 program and the standard HXTT Text
The HXTT Text JDBC package contained in DataExp 2007 program can only used in DataExp 2007 program and have some functional limit, so you cann't use it for other usage.
There are no other difference between the two package. They can accept the same jdbc url, and connect properties, and operate data, etc.
|7. Can export a table data to a non-exists table?
Yes. This package will auto create the destination table. In the GUI application, you can change the table structure when need creating the table.
|8. I would like to export data from our application, instead of load it in DB2 database or GUI application. can do so?|
|Yeah. You can do so if you buy the Enterprise Text2DB2 product . Maybe you should pay the attention to the licence.|
There is a class named com.hxtt.data.export.advance.Text2DB2 in the Embedded(WithDrv) Package and Embedded(WithoutDrv) Package contains a series method to export data.
All public method please see here.
|9. May I execute export operation at a assign time?|
|Yeah. You can execute export operation from a configuration file saved by prior export operation. So, you can use the Task Scheduler(in Windows) or Crontab(in Unix/Linux) to execute export operation.|
|Embed Package Questions|
|1. What's the Embed Package?|
|Embed Package is a jar file which can load into DB2 database and execute
export operation by DB2 procedure, or can used in your java program to
execute export operation.
The Embedded(WithDrv) Package contains the HXTT Text JDBC package, and Embedded(WithoutDrv) Package doesn't.
If you have bought the the HXTT Text JDBC package, you can use the Embedded(WithoutDrv) Package to execute export operation. or else, you should the Embedded(WithDrv) Package to execute export operation.
|2. How do I load the Embed Package(With HXTT Text JDBC Driver) into DB2 Database and execute export operation in DB2 database?|
|You can do as follows.
|In DB2 Command Editor, run the follows command to load
the embed package into DB2 database.
Then, you should create the follows procedure,
create procedure exportTable(
in schemaname varchar(200),
in tablename varchar(200),
in targetdirectory varchar(200),
in targettablename varchar(200),
in targetconnpar varchar(200))
external name 'DB22ACCESS:com.hxtt.data.export.advance.Text2DB2.exportTable'
language java parameter style java
Then, you can use the procedure exportTable to export table/view date to DBase4 table.
|3. How do I load the Embed Package(Without HXTT Text JDBC Driver) into DB2 Database and execute export operation in DB2 database?|
|It's same as install the Embed Package(With HXTT Text JDBC Driver) into DB2 database.
But you should install the HXTT Text JDBC Driver at the same time.
In DB2 Command Editor, run the follows command to install the embed package into DB2 database.
call sqlj.install_jar('file:c:/Text_JDBC20.jar;c:/ EMBText2DB2_WithDRV.jar','Text2DB2')
|4. When I install package to DB2 database, errors happen.|
Please see http://www.ibm.com/developerworks/db2/library/techarticle/dm-0510law/. This page shows a lot of errors and give a answer.
|5. I loaded the package, created the procedure, but when executing procedure exportTable, errors happened.|
Maybe you should restart the database server. I don't know why but when i restart the database server, it works well.
|6. I loaded the package, created the procedure, grant privilege, and execute procedure exportTable successly in machine, but I cann't find the data file in my machine|
The data file will be located the DB2 Database Server machine.
|7. How to export data accord a SQL query?|
EXPORTQUERY('c:/tmp/','select * from aa.atable a,bb.btable b where a.id=b.id',null,'XTABLE',null);
|8. Can I load two package to DB2(8i or upper) database, for example, EMBDB22DBF_WithDrv.jar and EMBDBF2DB2_WithDrv.jar?|
|You can do so. But you should assign the different name when install this package..|