XQuery/Microsoft-Access

(Redirected from Microsoft-Access)

NOTICE: as of java 8 the JDBC-ODBC bridge has been removed. Therefore, this may not work as expected in eXist versions after 2.2



How to access a Microsoft Access database using the SQL library--

Use the sql:get connection() function Use the sun JDBC/ODBC driver string "sun.jdbc.odbc.JdbcOdbcDriver" Specify a jdbc-style URL Specify the path name to the mdb file

Example program

xquery version "3.0";

let $conn := sql:get-connection("sun.jdbc.odbc.JdbcOdbcDriver", "jdbc:ucanaccess://e:/db1.mdb;memory=false")

return sql:execute($conn, "SELECT * FROM tbl1", false())

Note that this library converts Access' quirky UTF-16 to UTF-8. Other libraries do not do this.

Posted to the eXist list by W.S. Hager on May 17th, 2014