Chapter 1. Quick Start
Index:
HXTT Word provides a type 4 JDBC driver for Microsoft Word (MS Word) version from 2007, 2010, 2013, to 2016. It supports JDBC4.2, and JDBC4.3. It supports JDK1.8.X, Java 9, Java 10, and Java 11. It supports 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 { 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 Word packages are available here:
First, you need to download Java11 from http://www.oracle.com if you use Word JDBC 4.3 package(Word_JDBC43.jar). You can download JDK1.8.X from http://www.oracle.com if you use Word JDBC 4.2 package(Word_JDBC42.jar).
Secondly, please add Word_JDBC43.jar or Word_JDBC42.jar to your Java class path, for instance, "SET CLASSPATH=c:\javalib\Word_JDBC42.jar;%classpath%". You can also use "java -classpath c:\javalib\Word_JDBC42.jar yourWordclass" 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\Word_JDBC42.jar yourWordclass" too.
Thirdly, you can use 'Class.forName("com.hxtt.sql.word.WordDriver").newInstance();' or Class.forName("com.hxtt.sql.word.WordDriver");' 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 Word URL format below. If you were a Java novice, please
read also other Java examples code in Word_JDBC43demo.zip, Word_JDBC42demo.zip, Word_JDBC41demo.zip
or Word_JDBC40demo.zip.
Word URL format:
Embedded: jdbc:word:[//]/[DatabasePath][?prop1=value1[;prop2=value2]] (You can omit that "//" characters sometimes) For example: "jdbc:word:/." "jdbc:word:/c:/data" for Windows driver "jdbc:word:///c:/data" for Windows driver "jdbc:word:////usr/data" for unix or linux "jdbc:word://///192.168.10.2/sharedir" for UNC path "jdbc:word:/./data" "jdbc:word:/./data/mydata.docx" Remote Access (client/server mode): jdbc:word://host:port/[DatabasePath] For example: "jdbc:word://domain.com:3099/c:/data" if one WordServer is run on the 3099 port of domain.com "jdbc:word://domain.com:3099/c:/data/mydata.docx" 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:word:/c:/test/testword.zip Memory-only Database: jdbc:word:/_memory_/ URL Database:(http protocol, https protocol, ftp protocol, sftp protocol) jdbc:word:http://httpURL jdbc:word:https://httpsURL jdbc:word:ftp://ftpURL jdbc:word:ftpes://ftpURL jdbc:word:ftps://ftpURL jdbc:word:sftp://sftpURL For example: "jdbc:word: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:word:sftp://testa:123456@localhost" SAMBA Database:(smb protocol) jdbc:word:smb://[[[domain;]username[:password]@]server[:port]/[[share/[dir/]file]]][?[param=value]] For example: "jdbc:word:smb://test1:123@100.100.13.94/wordfiles".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:word:/" or "jdbc:word:///". 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$\wordfiles\test; elect * from "\\amd2500\d$\wordfiles".test; select * from ".".test; HXTT Word 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.
Word 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.