Chapter 1. Quick Start

Index:

  1. What Is the HXTT DBF?
  2. Follow Me

What Is the HXTT DBF?

HXTT DBF driver has become the best JDBC driver for Xbase database since 1999. It supports JDBC1.2, JDBC2.0, JDBC3.0, JDBC4.0, JDBC4.1, JDBC4.2, and JDBC4.3. It supports Personal Java, JDK1.0.X, JDK1.1.X, JDK1.2.X, JDK1.3.X, JDK1.4.X, JDK1.5.X, JDK1.6.X, JDK1.7.X, JDK1.8.X, Java 9, Java 10, Java 11, Java 12, Java 13, and Java 14. It supports dbase, Visual DBASE, SIx Driver, PowerPlus, Alaska, SoftC, Codebase, Clipper, Foxbase, Foxpro, and VFP. It supports FlexFile3, SIxMemo, DB2K, IDX, CDX, NDX, MDX, NTX, and CGP. It supports DBF, DBC, DCT, DCX, DBT, FPT, SMT, and user-defined extensions. It supports all transactions level of READ UNCOMMITTED, READ COMMITTED, REPEATABLE READ, and SERIALIZABLE. It supports Multi-user Access and Xbase applications' compatible lock. It supports Borland's BDE, Borland's Database Desktop, JBuilder's Database Pilot, Oracle's JVM, JDeveloper 10G, Dreamweaver UltraDev, Dreamweaver ColdFusion, ObJectRelationalBridge, DBVisualizer, iSQL-Viewer, AquaDataStudio, Sunopsis, MySQL Migration Toolkit, Tomcat, vqServer, Hibernate, SQuirreL SQL Client, Crystal Reports, Jisql, and DbEdit Database Utilites for Eclipse Platform. It supports XOPEN SQLState, RMI, Jini, JNDI, and serialization. It supports all codepage, multilingual collation sequence, and unicode character set. It supports { UNION | INTERSECT | EXCEPT | MINUS } [ ALL ] query , INNER JOIN, FULL JOIN, LEFT JOIN, RIGHT JOIN, NATURAL JOIN, CROSS JOIN, self join, GROUP_CONCAT, multiple-row VALUES table, PIVOT table, UNPIVOT table, and subquery which includes single-row subquery, multirow subquery, multiple-column subquery, inline views, and correlated subquery. The current version of the HXTT DBF packages are available here:

Follow Me

First, you need to download Java11 from http://www.oracle.com if you use DBF JDBC 4.3 package(DBF_JDBC43.jar). You can download JDK1.8.X from http://www.oracle.com if you use DBF JDBC 4.2 package(DBF_JDBC42.jar). You can download JDK1.7.X, JDK1.8.X, or Java 11, if you use DBF JDBC 4.1 package(DBF_JDBC41.jar). You can download JDK1.6.X, JDK1.7.X, JDK1.8.X, or Java 11, if you use DBF JDBC 4.0 package(DBF_JDBC40.jar). You can download JDK 1.3.X, 1.4.X, or JDK1.5.X if you use DBF JDBC 3.0 package(DBF_JDBC30.jar). You can download JDK1.2.X too if you use DBF JDBC 2.0 package(DBF_JDBC20.jar). You can download JDK1.1.X too if you use DBF JDBC 1.2 package(DBF_JDBC12.jar).

Secondly, please add DBF_JDBC43.jar or DBF_JDBC42.jar, DBF_JDBC41.jar, DBF_JDBC40.jar, DBF_JDBC30.jar, DBF_JDBC20.jar, or DBF_JDBC12.jar to your Java class path, for instance, "SET CLASSPATH=c:\javalib\DBF_JDBC42.jar;%classpath%". You can also use "java -classpath c:\javalib\DBF_JDBC42.jar yourDBFclass" to run your class. More information about classpath, please read the "Setting the Classpath" topic in file:///yourdriver|/jdk1.8/docs/tooldocs/tools.html . You can use "java -classpath c:\javalib\DBF_JDBC42.jar yourDBFclass" too.

Thirdly, you can use 'Class.forName("com.hxtt.sql.dbf.DBFDriver").newInstance();' or Class.forName("com.hxtt.sql.dbf.DBFDriver");' to load this driver.

Fourth, if you have used other JDBC driver, you only need to know the correct URL format for DriverManager.getConnection(url,"",""); You can find the DBF URL format below. If you were a Java novice, please read also other Java examples code in DBF_JDBC43demo.zip, DBF_JDBC42demo.zip, DBF_JDBC41demo.zip or DBF_JDBC40demo.zip.
DBF URL format:

        Embedded:
                jdbc:dbf:[//]/[DatabasePath][?prop1=value1[;prop2=value2]] (You can omit that "//" characters sometimes)
                        For example:
                                "jdbc:dbf:/."
                                "jdbc:dbf:/c:/data" for Windows driver
                                "jdbc:dbf:///c:/data" for Windows driver
                                "jdbc:dbf:////usr/data" for unix or linux
                                "jdbc:dbf://///192.168.10.2/sharedir" for UNC path
                                "jdbc:dbf:/./data"
        Remote Access (client/server mode):
                jdbc:dbf://host:port/[DatabasePath]
                        For example: "jdbc:dbf://domain.com:3099/c:/data" if one DBFServer is run on the 3099 port of domain.com
        Compressed Database:(.ZIP, .JAR, .GZ, .TAR, .BZ2, .TGZ, .TAR.GZ, .TAR.BZ2, .7z) 
                jdbc url format is the same as embedded url and remote url.
                        For example:
                                "jdbc:dbf:/c:/test/testdbf.zip
        Memory-only Database:
                jdbc:dbf:/_memory_/
        URL Database:(http protocol, https protocol, ftp protocol, sftp protocol)
                jdbc:dbf:http://httpURL
                jdbc:dbf:https://httpsURL
                jdbc:dbf:ftp://ftpURL
                jdbc:dbf:ftpes://ftpURL
                jdbc:dbf:ftps://ftpURL
                jdbc:dbf:sftp://sftpURL
                        For example:
                                "jdbc:dbf:http://www.hxtt.com/test" ////Note: FTP site's user/password should be set in ftpURL, and cannot be set in JDBC connection property because user/password JDBC connection property belongs to server/client connection.
                                               //FTP  protocol supports  explicit SSL/TLS encryption (FTPES)  and  implicit SSL/TLS (FTPS). FTPES can be detected according to FTP Server reply, and FTPS can be used if you use port 990 in  Ftp url.
	        "jdbc:dbf:sftp://testa:123456@localhost"

        SAMBA Database:(smb protocol)
                jdbc:dbf:smb://[[[domain;]username[:password]@]server[:port]/[[share/[dir/]file]]][?[param=value]]
                        For example:
                                "jdbc:dbf:smb://test1:123@100.100.13.94/dbffiles".zone" ////Note: SAMBA user/password should be set in SMB URL, and cannot be set in JDBC connection property because user/password JDBC connection property belongs to server/client connection.
	Free JDBC url:(Warning: only use it for special project)
                jdbc:dbf:/" or "jdbc:dbf:///". Then you can use some full UNC path names in SQL to visit anywhere where your Java VM has right to access.
                        For instance:
                                select * from \\amd2500\e$\dbffiles\test;
                                elect * from "\\amd2500\d$\dbffiles".test;
                                select * from ".".test;

         HXTT DBF supports seamlessly data mining on memory-only table, physical table, url table, compressed table, SAMBA table in a sql. More details
         is in Advanced Programming chapter.


Last, DBF driver is a standard JDBC driver so that you will find most of valuable information at file:///yourdrive|/jdk1.8/docs/api/java/sql/package-frame.html .

DBF supports SQL-92. It supports { UNION | INTERSECT | EXCEPT | MINUS } [ ALL ] query , INNER JOIN, FULL JOIN, LEFT JOIN, RIGHT JOIN, NATURAL JOIN, CROSS JOIN, self join, GROUP_CONCAT, and subquery which includes single-row subquery, multirow subquery, multiple-column subquery, inline views, and correlated subquery. The major syntax is listed at here.

DBF driver will use index to speed up the query which contains some indexed expressions. DBF supports utilizing index file for LIKE, BETWEEN, IN, DISTINCT, ORDER, and some OR operations.

File name is case sensitive on unix OS. For unix or linux, DBF will try to seek acquiescently dbf files with the suffixs like ".DBF" for the first time, and ".dbf" for the second time. If it failed to find out a suitable dbf file, it will try other mixture method. You can also use the full table name to quote your table. For instance, 'select * from "Test.dBf"'.

 
Copyright © 2003-2019 Heng Xing Tian Tai Lab | All Rights Reserved. |