FAQ for Sybase2DBF Packages
The most recent version of this document can be viewed at here.
Table of Contents
1. General Questions

2. EMBED Package Questions
 
General Questions
 
1. How to know the detailed version information of Sybase2DBF 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 Sybase2DBF 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 Sybase2DBF Package, Embedded(WithDrv) Package, Embedded(WithoutDrv) Package
The Sybase2DBF Package is a GUI application , and the Embedded package is a package which can load into Sybase database(ASE 12.0 or upper). If you're exporting data by GUI application or a configuration file, you should use the Sybase2DBF Package . If you want to export data more quickly and more flexibly, you can use the Sybase2DBF Embedded Package.
As the tips by the name, Embedded(WithDrv) Package contains the HXTT DBF JDBC package, and Embedded(WithoutDrv) Package doesn't.
 
4. What's the difference between the professional Sybase2DBF Package and the enterprise Sybase2DBF Package?
The standard Sybase2DBF Package can export table data to dBASE, Foxbase, Foxpro, and VFP from Sybase.
The enterprise Sybase2DBF Package contains the function of standard Sybase2DBF 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 Sybase database(ASE 12.0 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 Sybase 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 Sybase database, this error happens is because you haven't load the HXTT DBF JDBC package in Sybase database.
 
6. What's the diffirence between the HXTT DBF JDBC package contained in DataExp 2007 program and the standard HXTT DBF JDBC package?
The HXTT DBF 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 Sybase database or GUI application. can  can do so?
Yeah. You can do so if you buy the Enterprise Sybase2DBF product . Maybe you should pay the attention to the licence.

There is a class named com.hxtt.data.export.advance.Sybase2DBF 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 Sybase database and execute export operation by Sybase procedure, or can used in your java program to execute export operation.
The Embedded(WithDrv) Package contains the HXTT DBF JDBC package, and Embedded(WithoutDrv) Package doesn't.
If you have bought the the HXTT DBF 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 DBF JDBC Driver) into Sybase Database and execute export operation in Sybase database?
 
You can use the follows command to load package in windows command or linux shell.

  In windows,

 
  instjava -f c:/EMBSybase2DBF_WithDRV.jar' -SDBServername -Ssa -Dmydb

  In Unix/Linux,

   installjava -f c:/EMBSybase2DBF_WithDRV.jar' -SDBServername -Ssa -Dmydb

  After have load this package to Sybase database, you can create a JAVA procedure to execute the export operation, the follows SQL show how to create a java procedure.

create procedure exportTableToFoxpro10(
    schemaName varchar(255),
    tableName varchar(255),
    targetDirectory varchar(255),
    targetTableName varchar(255),
    targetConnPar varchar(255) )
    language java parameter style java external name
    'com.hxtt.data.export.advance.Sybase2DBF.exportTableToFoxpro10(
    java.lang.String,
    java.lang.String,
    java.lang.String,
    java.lang.String,
    java.lang.String)'

   You can create other procedure for the other public method. All public method please see here.
    
   Then you call this procedure like call other procedure to execute export operation.

 
  3. When I load the package to the Sybase databae, errors happened?
  When i use the instjava/installjava to install package to Sybase database, it says,

Cannot run this command because Java services are not enabled. A user with
System Administrator (SA) role must reconfigure the system to enable Java.

This is because you have not enabled java in the Sybase database. You should login as sa and run the command in the master database.

sp_configure "enable java",1

and restart the Sybase database.
 
  4. I loaded the package, created the procedure, but when executing procedure exportTableToFoxpro10, errors happened.
 

When I want export data to a file, it says:

Server Message: Number 10700, Severity 10
Server 'MYDB', Procedure 'exportTable'', Line 3:
java.io.IOException: Cannot open file

This is because in Adaptive Sybase Enterprise, java procedure or java function can not access file.
In Sybase Anywhere(9.0.1 or upper), there is a configuration parameter, java_input_output, set it to ON, you can access the file.

 
  5. How to export data accord a SQL query?
  For example,

BEGIN
  exportQueryToFoxpro10('select * from aa.atable a,bb.btable b where a.id=b.id','//192.168.1.1:5252/c:/tmp','XTABLE',null);
END;

 
  6. Can I load two package to Sybase(ASE12 or upper) database, for example, EMBSybase2DBF_WithDrv.jar and EMBDBF2Sybase_WithDrv.jar?

You cannot do so. For there are some If you have the request, please tell us, we will create a special package for you.

 

Copyright © 2006 Hongxin Technology & Trade Ltd. | All Rights Reserved. |