### JDBC Connection URL examples Source: https://github.com/spannm/ucanaccess/blob/master/docs/30-jdbc-client-tools.html Examples of JDBC connection strings for different operating systems and path types. ```text jdbc:ucanaccess://C:/Users/Public/Database1.accdb;showSchema=true ``` ```text jdbc:ucanaccess:////servername/sharename/foldername/Database1.accdb;showSchema=true ``` ```text jdbc:ucanaccess:///home/gord/Documents/Database1.accdb;showSchema=true ``` -------------------------------- ### Export Command Syntax Example Source: https://github.com/spannm/ucanaccess/blob/master/docs/xref/net/ucanaccess/console/Main.html Example usage of the export command provided in the Javadoc. ```text export -d , -t License License.csv ``` -------------------------------- ### Sql Example Source: https://github.com/spannm/ucanaccess/blob/master/docs/apidocs/net/ucanaccess/util/Sql.html Example of how to use the Sql.of() method to construct an SQL statement. ```APIDOC ## Example ```java String tblName = "table"; Sql sqlStatement = Sql.of("SELECT COUNT(*)", "FROM", tblName, " WHERE cond1 = :cond1", " AND cond2 = :cond2"); ``` ``` -------------------------------- ### Table Creation Entry Point Source: https://github.com/spannm/ucanaccess/blob/master/docs/xref/net/ucanaccess/converters/Persist2Jet.html Initializes table creation process including metadata and builder setup. ```java public void createTable(String tableName, Map columnMap, String[] types, String[] defaults, Boolean[] notNulls) throws IOException, SQLException { UcanaccessConnection conn = UcanaccessConnection.getCtxConnection(); final Database db = conn.getDbIO(); String tn = escape4Access(tableName); String ntn = escape4Hsqldb(tableName); Metadata mtd = new Metadata(conn.getHSQLDBConnection()); TableBuilder tb = new TableBuilder(tn); int idTable = mtd.newTable(tn, ntn, ObjectType.TABLE); Collection lcb = getColumns(ntn, columnMap, types); ``` -------------------------------- ### UCanAccess Connection with Options Source: https://github.com/spannm/ucanaccess/blob/master/docs/20-getting-started.html Example of establishing a UCanAccess connection with specific options like openExclusive and ignoreCase enabled. ```java Connection conn = DriverManager.getConnection("jdbc:ucanaccess://c:/data/myaccessdb.mdb;openExclusive=true;ignoreCase=true"); ``` -------------------------------- ### Get Single Quote Group Source: https://github.com/spannm/ucanaccess/blob/master/docs/xref/net/ucanaccess/converters/SQLConverter.html Finds the start and end indices of a single-quoted string literal within a SQL string. It handles escaped single quotes ('') correctly. ```Java if (!_s.contains("''")) { Matcher m = Patterns.QUOTE_M.matcher(_s); if (m.find()) { return new int[]{m.start(), m.end()}; } } else { int[] ret = new int[]{-1, -1}; Matcher m = Patterns.QUOTE_S.matcher(_s); while (m.find()) { int start = m.start(); int end = m.end(); if ((end - start) % 2 == 0) { if (ret[0] == -1) { return new int[]{m.start(), m.end()}; } } else { if (ret[0] == -1) { ret[0] = m.start(); } else { ret[1] = m.end(); return ret; } } } } return new int[0]; ``` -------------------------------- ### Main Entry Point Source: https://github.com/spannm/ucanaccess/blob/master/docs/xref/net/ucanaccess/console/Main.html The main method handles command-line arguments, including loading properties files or opening database files, and initializes the UCanAccess driver. ```java public static void main(String[] _args) throws Exception { BufferedReader input = new BufferedReader(new InputStreamReader(System.in)); // password properties info Properties props = new Properties(); File fl = null; long size = 0; String passwordEntry = ""; String[] commands = null; if (_args.length > 0) { String file = _args[0]; if (file.endsWith(".properties")) { File pfl = new File(_args[0]); if (pfl.exists()) { try (FileInputStream fis = new FileInputStream(pfl)) { props.load(fis); } // convert keys to enum name or lower-case props = props.stringPropertyNames().stream() .collect(Collectors.toMap( k -> Optional.ofNullable(Property.parse(k)).map(Property::name).orElse(k.toLowerCase()), props::getProperty, (v1, v2) -> v1, Properties::new)); } } else if (file.endsWith(".accdb") || file.endsWith(".mdb")) { fl = new File(file); size = fl.length(); if (_args.length > 1) { int arg = 1; if (hasPassword(fl)) { passwordEntry = _args[arg++]; } else { commands = Arrays.copyOfRange(_args, arg++, _args.length); } } } } try { Class.forName("net.ucanaccess.jdbc.UcanaccessDriver"); } catch (ClassNotFoundException _ex) { System.err.println(_ex.getMessage()); System.err.println("Check your classpath!"); System.exit(1); ``` -------------------------------- ### Get Double Quote Group Source: https://github.com/spannm/ucanaccess/blob/master/docs/xref/net/ucanaccess/converters/SQLConverter.html Finds the start and end indices of a double-quoted string literal within a SQL string. It handles escaped double quotes (""") correctly. ```Java if (!_s.contains("\"\"")) { Matcher m = Patterns.DOUBLE_QUOTE_M.matcher(_s); if (m.find()) { return new int[]{m.start(), m.end()}; } } else { int[] ret = new int[]{-1, -1}; Matcher mc = Patterns.DOUBLE_QUOTE_S.matcher(_s); while (mc.find()) { int start = mc.start(); int end = mc.end(); if ((end - start) % 2 == 0) { if (ret[0] == -1) { return new int[]{mc.start(), mc.end()}; } continue; } else { if (ret[0] == -1) { ret[0] = mc.start(); } else { ret[1] = mc.end(); return ret; } } } } return new int[0]; ``` -------------------------------- ### void main(String[] _args) Source: https://github.com/spannm/ucanaccess/blob/master/docs/apidocs/net/ucanaccess/console/Main.html The main entry point for the application. ```APIDOC ## main ### Description Standard entry point for the application execution. ### Parameters - **_args** (String[]) - Required - Command line arguments. ### Errors - **Exception** - Thrown if an error occurs during execution. ``` -------------------------------- ### Initialize UCanAccess Database Reference Source: https://github.com/spannm/ucanaccess/blob/master/docs/xref/net/ucanaccess/jdbc/UcanaccessDriver.html Sets up the database reference by parsing file formats, configuring custom openers, and validating character sets. ```java ff = FileFormat.parse(props.get(newDatabaseVersion)); } boolean useCustomOpener = props.containsKey(jackcessOpener); IJackcessOpenerInterface jko = useCustomOpener ? newJackcessOpenerInstance(props.get(jackcessOpener)) : new DefaultJackcessOpener(); Charset charsetArg = Try.catching(() -> Optional.ofNullable(props.get(charset)).map(String::trim).map(Charset::forName).orElse(null)) .orThrow(ex -> new UcanaccessRuntimeException(MessageFormat.format("Unsupported charset in parameter {0}: {1}", charset, props.get(charset)), ex)); DBReference dbRef = alreadyLoaded ? as.getReference(fileDb) : as.loadReference(fileDb, ff, jko, props.get(password), charsetArg); ``` -------------------------------- ### Validate GUID format Source: https://github.com/spannm/ucanaccess/blob/master/docs/xref/net/ucanaccess/triggers/TriggerAutoNumber.html Ensures that a provided GUID object matches the required length and pattern constraints. ```java private void validateGUID(Object guid) throws SQLException { if (guid instanceof String) { String guidS = (String) guid; if (guidS.length() != 38 || !guidS.matches(GUID_PATTERN)) { throw new SQLException("Invalid guid format " + guidS); } } } } ``` -------------------------------- ### Export command path examples Source: https://github.com/spannm/ucanaccess/blob/master/docs/30-jdbc-client-tools.html Demonstrates how to represent Windows file paths in UCanAccess commands using single or double backslashes. ```text UCanAccess>export -t License c:\temp\new\License.csv; UCanAccess>export -t License "c:\\temp\\new\\License.csv"; ``` -------------------------------- ### Create Table AS Select Source: https://github.com/spannm/ucanaccess/blob/master/docs/20-getting-started.html Shows how to create a new table by copying data from an existing table using the 'CREATE TABLE AS' syntax. ```java st.executeUpdate("CREATE TABLE copy AS (SELECT * FROM example1) WITH DATA "); ``` -------------------------------- ### InStrRev Function Source: https://github.com/spannm/ucanaccess/blob/master/docs/xref/net/ucanaccess/converters/Functions.html Searches for a substring within a string, starting from a specified position and returning the starting position of the substring. It supports case-sensitive and case-insensitive comparisons. ```APIDOC ## InStrRev Function ### Description Searches for a substring within a string, starting from a specified position and returning the starting position of the substring. It supports case-sensitive and case-insensitive comparisons. ### Method N/A (Function implementation) ### Endpoint N/A ### Parameters #### Path Parameters N/A #### Query Parameters N/A #### Request Body N/A ### Request Example N/A ### Response #### Success Response (200) N/A #### Response Example N/A ``` -------------------------------- ### main Method Source: https://github.com/spannm/ucanaccess/blob/master/docs/apidocs/net/ucanaccess/console/Main.html The entry point for the UCanAccess console application. ```APIDOC ## main Method ### Description The entry point for the UCanAccess console application. ### Method STATIC ### Parameters #### Path Parameters - **_args** (String[]) - Required - Command-line arguments. ### Request Example ```json { "_args": ["arg1", "arg2"] } ``` ### Response #### Success Response (200) - **void** - This method does not return any value. #### Response Example ```json { "message": "Main method executed successfully" } ``` ``` -------------------------------- ### right Source: https://github.com/spannm/ucanaccess/blob/master/docs/apidocs/net/ucanaccess/converters/Functions.html Extracts a substring from a string starting from the right-most character. ```APIDOC ## right ### Description Extracts a substring from a string starting from the right-most character. ### Parameters - **input** (String) - The input string. - **i** (int) - The number of characters to extract from the right. ### Response - **Returns** (String) - The extracted substring. ``` -------------------------------- ### UcanaccessConnection getClientInfo Methods Source: https://github.com/spannm/ucanaccess/blob/master/docs/apidocs/index-all.html Gets the current client information. ```APIDOC ## GET /api/ucanaccess/connection/clientinfo ### Description Gets the current client information. ### Method GET ### Endpoint /api/ucanaccess/connection/clientinfo ### Parameters #### Query Parameters - **name** (String) - Optional - The name of the client information property to retrieve. ### Response #### Success Response (200) - **clientInfo** (Properties) - A java.util.Properties object containing the client information. #### Response Example ```json { "clientInfo": { "ClientUser": "user1", "ApplicationName": "App1" } } ``` ``` -------------------------------- ### Display Console Welcome Message Source: https://github.com/spannm/ucanaccess/blob/master/docs/xref/net/ucanaccess/console/Main.html Prints the UCanAccess version and usage instructions to the console. ```java private void sayHello(String version) { prompt(""); System.out.println("UCanAccess version " + version); System.out.println("You are connected!! "); System.out.println("Type quit to exit "); System.out.println(); System.out.println("Commands end with ; "); System.out.println(); System.out.println("Use: "); System.out.printf(" %s;%n", EXPORT_USAGE); System.out.println( "for exporting the result set from the last executed query or a specific table into a .csv file"); prompt(); } ``` -------------------------------- ### Get Connection Source: https://github.com/spannm/ucanaccess/blob/master/docs/xref/net/ucanaccess/jdbc/UcanaccessStatement.html Retrieves the UcanaccessConnection object associated with this statement. ```APIDOC ## getConnection() ### Description Retrieves the UcanaccessConnection object associated with this statement. ### Method `UcanaccessConnection` ### Endpoint N/A (Method within a JDBC Statement implementation) ### Parameters None ### Request Example N/A ### Response #### Success Response (200) - `UcanaccessConnection` - The `UcanaccessConnection` object. #### Response Example ```json { "connection": "[UcanaccessConnection object]" } ``` ``` -------------------------------- ### Get Database URL Source: https://github.com/spannm/ucanaccess/blob/master/docs/xref/net/ucanaccess/jdbc/UcanaccessConnection.html Retrieves the database connection URL. ```java public String getUrl() { return url; } ``` -------------------------------- ### Initialize HSQLDB Connection Source: https://github.com/spannm/ucanaccess/blob/master/docs/xref/net/ucanaccess/jdbc/UcanaccessDriver.html Sets up the HSQLDB connection, configures the time zone to UTC, and initializes the LoadJet process. ```java Optional.ofNullable(props.get(user)) .ifPresent(session::setUser); SQLWarning sqlw = null; if (!alreadyLoaded) { boolean toBeLoaded = !dbRef.loadedFromKeptMirror(session); Connection conn = dbRef.getHSQLDBConnection(session); // from version 2.7 hsqldb translates timestamps stored without timezone in the database // into the default timezone. MS Access however does not know timezones, therefore assume timestamps are UTC Try.withResources(conn::createStatement, st -> { st.executeQuery("SET TIME ZONE 'UTC'"); }).orThrow(); LoadJet la = new LoadJet(conn, dbRef.getDbIO()); if (props.containsKey(sysSchema)) { boolean val = Boolean.parseBoolean(props.get(sysSchema)); dbRef.setSysSchema(val); la.setSysSchema(val); } if (props.containsKey(skipIndexes)) { ``` -------------------------------- ### Get Password Property Source: https://github.com/spannm/ucanaccess/blob/master/docs/xref/net/ucanaccess/jdbc/UcanaccessConnectionBuilder.html Retrieves the configured password from the properties. ```java public String getPassword() { return (String) props.get(password); } ``` -------------------------------- ### Get User Property Source: https://github.com/spannm/ucanaccess/blob/master/docs/xref/net/ucanaccess/jdbc/UcanaccessConnectionBuilder.html Retrieves the configured username from the properties. ```java public String getUser() { return (String) props.get(user); } ``` -------------------------------- ### Main Class Constructor Source: https://github.com/spannm/ucanaccess/blob/master/docs/apidocs/net/ucanaccess/console/Main.html Initializes the Main class with a database connection and a buffered reader for input. ```APIDOC ## Main Constructor ### Description Initializes the Main class with a database connection and a buffered reader for input. ### Method CONSTRUCTOR ### Parameters #### Path Parameters - **conn** (Connection) - Required - The SQL connection object. - **input** (BufferedReader) - Required - The buffered reader for console input. ### Request Example ```json { "conn": "java.sql.Connection", "input": "java.io.BufferedReader" } ``` ### Response #### Success Response (200) - **void** - Constructor does not return a value. #### Response Example ```json { "message": "Constructor executed successfully" } ``` ``` -------------------------------- ### getUrl / setUrl Source: https://github.com/spannm/ucanaccess/blob/master/docs/apidocs/net/ucanaccess/jdbc/UcanaccessConnection.html Methods to get or set the database URL. ```APIDOC ## getUrl ### Description Retrieves the current database URL. ## setUrl ### Description Sets the database URL. ### Parameters #### Request Body - **_url** (String) - Required - The URL string. ``` -------------------------------- ### Create Tables with DDL Source: https://github.com/spannm/ucanaccess/blob/master/docs/20-getting-started.html Demonstrates various ways to create tables using Data Definition Language (DDL) statements in UCanAccess. ```java st.execute("CREATE TABLE example1 (id COUNTER PRIMARY KEY, descr TEXT(400), number NUMERIC(12,3), date0 DATETIME)"); ``` ```java st.execute("CREATE TABLE dkey (c COUNTER, number NUMERIC(23, 5), PRIMARY KEY (C, NUMBER)"); ``` ```java st.execute("CREATE TABLE dtrx (c TEXT, number NUMERIC(23, 5), UNIQUE (C, NUMBER))"); ``` ```java st.execute("CREATE TABLE Parent (x AUTOINCREMENT PRIMARY KEY, y TEXT(222))"); ``` ```java st.execute("CREATE TABLE Babe (k LONG, y LONG, PRIMARY KEY(k,y), FOREIGN KEY (y) REFERENCES Parent (x) )"); ``` -------------------------------- ### GET /configuration Source: https://github.com/spannm/ucanaccess/blob/master/docs/apidocs/net/ucanaccess/jdbc/UcanaccessDataSource.html Retrieves various configuration settings for the UcanaccessDataSource. ```APIDOC ## GET /configuration ### Description Retrieves configuration settings such as access path, user, column order, and encryption status. ### Methods - **getAccessPath()**: Returns the access path. - **getUser()**: Returns the user name. - **getColumnOrder()**: Returns the column order configuration. - **getConcatNulls()**: Returns the concat nulls setting. - **getEncrypt()**: Returns the encryption status. - **getIgnoreCase()**: Returns the ignore case setting. - **getImmediatelyReleaseResources()**: Returns the resource release setting. ``` -------------------------------- ### Display Export Help Information Source: https://github.com/spannm/ucanaccess/blob/master/docs/xref/net/ucanaccess/console/Main.html Prints the available command-line flags and syntax for the export command. ```java private void printExportHelp() { System.out.printf("Usage: %s;%n", EXPORT_USAGE); System.out.println("Export the most recent SQL query to the given file."); System.out.println(" -d Set the CSV column delimiter (default: ';')."); System.out.println(" -t Output the
instead of the previous query."); System.out.println(" --big_query_schema Output the BigQuery schema" + " to ."); System.out.println(" --bom Output the UTF-8 byte order mark."); System.out.println(" --newlines Preserve embedded newlines (\\r, \\n)."); System.out.println(" --help Print this help message."); System.out.println("Single (') or double (\" ) quoted strings are supported."); System.out.println("Backslash (\\) escaping (e.g. \\n, \\t) is enabled within quotes."); System.out.println("Use two backslashes (\\\\) to insert one backslash within quotes " + "(e.g. \"c:\\\\temp\\\\newfile.csv\")."); } ``` -------------------------------- ### GET /getConnection Source: https://github.com/spannm/ucanaccess/blob/master/docs/apidocs/net/ucanaccess/jdbc/UcanaccessDataSource.html Establishes a connection to the Microsoft Access database. ```APIDOC ## GET /getConnection ### Description Opens a connection to the Access database using the configured data source settings. ### Method GET ### Endpoint /getConnection ### Response #### Success Response (200) - **Connection** (java.sql.Connection) - The established database connection object. ``` -------------------------------- ### Create and Populate Table Source: https://github.com/spannm/ucanaccess/blob/master/docs/xref/net/ucanaccess/converters/Persist2Jet.html Handles table creation, index configuration, and data migration from HSQLDB to the UCanAccess table structure. ```java tb.addColumns(lcb); int colIdx = 0; for (ColumnBuilder cb : lcb) { mtd.newColumn(cb.getName(), SQLConverter.preEscapingIdentifier(cb.getName()), getUcaMetadataTypeName(colIdx, cb, types), idTable); colIdx++; } List arcl = getIndexBuilders(ntn, columnMap); IndexBuilder ibpk = getIndexBuilderPK(ntn, columnMap); checkPK(arcl, ibpk); if (ibpk != null) { arcl.add(ibpk); } for (IndexBuilder ixb : arcl) { tb.addIndex(ixb); } Table table = tb.toTable(db); saveColumnsDefaults(defaults, notNulls, table); LoadJet lj = new LoadJet(conn.getHSQLDBConnection(), db); lj.loadDefaultValues(table); createForeignKeys(tableName); try (UcanaccessStatement st = conn.createStatement()) { @SuppressWarnings("java:S2077") ResultSet rs = st.executeQuery(String.format("SELECT * FROM %s", tableName)); List clns = getColumnNamesCreate(tn); while (rs.next()) { Object[] rec = new Object[clns.size()]; int i = 0; for (String columnName : clns) { rec[i++] = rs.getObject(columnName); } new InsertCommand(table, rec, null).persist(); } } } ``` -------------------------------- ### GET /getCtxConnection Source: https://github.com/spannm/ucanaccess/blob/master/docs/apidocs/index-all.html Retrieves the current database connection from the execution context. ```APIDOC ## GET /getCtxConnection ### Description Returns the current database connection or null if no connection is available in the current context. ### Method GET ### Endpoint /getCtxConnection ``` -------------------------------- ### net.ucanaccess.ext Package Overview Source: https://github.com/spannm/ucanaccess/blob/master/docs/apidocs/net/ucanaccess/ext/package-summary.html Documentation for the net.ucanaccess.ext package, specifically detailing the FunctionType annotation. ```APIDOC ## Package net.ucanaccess.ext ### Description The net.ucanaccess.ext package provides extension capabilities for the UCanAccess library. ### Annotation Types - **FunctionType** - An annotation used within the net.ucanaccess.ext package. ``` -------------------------------- ### Get Function Columns Source: https://github.com/spannm/ucanaccess/blob/master/docs/xref/net/ucanaccess/jdbc/UcanaccessDatabaseMetadata.html Retrieves information about the columns of a specific function. ```APIDOC ## GET /api/metadata/functions/{functionNamePattern}/columns ### Description Retrieves information about the columns of a specific function. ### Method GET ### Endpoint /api/metadata/functions/{functionNamePattern}/columns ### Parameters #### Path Parameters - **functionNamePattern** (string) - Required - The pattern to match function names. #### Query Parameters - **catalog** (string) - Optional - The catalog name. - **schemaPattern** (string) - Optional - The schema name pattern. - **columnNamePattern** (string) - Optional - The column name pattern. ### Request Example None ### Response #### Success Response (200) - **functionColumns** (array) - An array of objects, where each object represents a function column. - **columnName** (string) - The name of the column. - **columnType** (int) - The data type of the column. - **precision** (int) - The precision of the column. - **scale** (short) - The scale of the column. #### Response Example ```json { "functionColumns": [ { "columnName": "InputParam", "columnType": 12, "precision": 255, "scale": 0 } ] } ``` ``` -------------------------------- ### Initialize Main Console Class Source: https://github.com/spannm/ucanaccess/blob/master/docs/xref/net/ucanaccess/console/Main.html Constructor for the Main class, requiring a JDBC Connection and a BufferedReader for input. ```java public Main(Connection _conn, BufferedReader _input) { conn = _conn; input = _input; } ``` -------------------------------- ### Get Wrapped ResultSet Source: https://github.com/spannm/ucanaccess/blob/master/docs/xref/net/ucanaccess/jdbc/UcanaccessResultSet.html Returns the underlying wrapped ResultSet object. ```Java public ResultSet getWrapped() { return wrapped; } ``` -------------------------------- ### Get Fetch Size Source: https://github.com/spannm/ucanaccess/blob/master/docs/xref/net/ucanaccess/jdbc/UcanaccessStatement.html Retrieves the fetch size for this Statement object. ```APIDOC ## getFetchSize() ### Description Retrieves the fetch size for this Statement object. ### Method `int` ### Endpoint N/A (Method within a JDBC Statement implementation) ### Parameters None ### Request Example N/A ### Response #### Success Response (200) - `int` - The current fetch size. #### Response Example ```json { "fetchSize": 50 } ``` ``` -------------------------------- ### Initialize Table Creation Source: https://github.com/spannm/ucanaccess/blob/master/docs/xref/net/ucanaccess/converters/LoadJet.html Prepares table names and triggers synchronization table creation. ```java private void createTable(Table t, boolean systemTable) throws SQLException, IOException { String tn = t.getName(); if (tn.indexOf(' ') > 0) { SQLConverter.addWhiteSpacedTableNames(tn); } String ntn = SQLConverter.escapeIdentifier(tn); // clean if (ntn == null) { return; } createSyncrTable(t, systemTable); ``` -------------------------------- ### Establish HSQLDB Connection Source: https://github.com/spannm/ucanaccess/blob/master/docs/xref/net/ucanaccess/jdbc/DBReference.html Establishes a connection to an HSQLDB database, handling initial setup and auto-commit settings. This method is used when a new connection is required. ```java Connection conn = DriverManager.getConnection(getHsqlUrl(\_session), Optional.ofNullable(\_session.getUser()).orElse("Admin"), \_session.getPassword()); ``` ```java version = conn.getMetaData().getDriverVersion(); ``` ```java setIgnoreCase(conn); ``` ```java initHSQLDB(conn); ``` ```java conn.setAutoCommit(false); ``` ```java return conn; ``` -------------------------------- ### Get Fetch Direction Source: https://github.com/spannm/ucanaccess/blob/master/docs/xref/net/ucanaccess/jdbc/UcanaccessStatement.html Retrieves the fetch direction for this Statement object. ```APIDOC ## getFetchDirection() ### Description Retrieves the fetch direction for this Statement object. ### Method `int` ### Endpoint N/A (Method within a JDBC Statement implementation) ### Parameters None ### Request Example N/A ### Response #### Success Response (200) - `int` - The current fetch direction. #### Response Example ```json { "fetchDirection": 1000 } ``` ``` -------------------------------- ### SQL Pagination with LIMIT and OFFSET Source: https://github.com/spannm/ucanaccess/blob/master/docs/20-getting-started.html Demonstrates how to implement SQL pagination using LIMIT and OFFSET clauses for retrieving a subset of records. ```java rs = st.executeQuery("SELECT * FROM example2 order by id desc LIMIT 5 OFFSET 1"); ``` -------------------------------- ### Get Ucanaccess Connection Source: https://github.com/spannm/ucanaccess/blob/master/docs/xref/net/ucanaccess/jdbc/UcanaccessStatement.html Returns the UcanaccessConnection object associated with this statement. ```java public UcanaccessConnection getConnection() { return connection; } ``` -------------------------------- ### Version Constructors Source: https://github.com/spannm/ucanaccess/blob/master/docs/apidocs/net/ucanaccess/complex/Version.html Details on how to instantiate the Version class. ```APIDOC ## Version Constructors ### Version public Version(io.github.spannm.jackcess.complex.Version cv) ### Version public Version(io.github.spannm.jackcess.complex.ComplexValue.Id id, String tableName, String columnName, String _value, LocalDateTime _modifiedDate) ### Version public Version(String _value, LocalDateTime _modifiedDate) ``` -------------------------------- ### Get Session ID Source: https://github.com/spannm/ucanaccess/blob/master/docs/xref/net/ucanaccess/jdbc/DBReference.html Returns the unique identifier for the current session. ```java return id; ``` -------------------------------- ### Get Minor Version Source: https://github.com/spannm/ucanaccess/blob/master/docs/xref/net/ucanaccess/jdbc/UcanaccessDriver.html Retrieves the minor version of the Ucanaccess driver. ```Java @Override public int getMinorVersion() { return VersionInfo.find(getClass()).getMinorVersion(); } ``` -------------------------------- ### connect Method Source: https://github.com/spannm/ucanaccess/blob/master/docs/apidocs/net/ucanaccess/jdbc/UcanaccessDriver.html Establishes a connection to the database specified by the URL and properties. ```APIDOC ## connect ### Description Establishes a connection to the database specified by the URL and properties. ### Method POST ### Endpoint N/A (Method of the Driver class) ### Parameters #### Query Parameters - **_url** (String) - Required - The database URL. - **_props** (Properties) - Optional - Connection properties. ### Throws - **SQLException** - If a database access error occurs. ### Response #### Success Response (200) - **connection** (Connection) - A `java.sql.Connection` object. ### Response Example ```json { "connection": "" } ``` ``` -------------------------------- ### Try Usage Examples Source: https://github.com/spannm/ucanaccess/blob/master/docs/xref/net/ucanaccess/util/Try.html Demonstrates conventional try/catch replacement, functional mapping of results, and handling try-with-resources scenarios using the Try utility. ```java // In this sample we query the last modification timestamp of a path p. // The API throws IOException (if an I/O error occurs). Path p = Path.of("a_path"); // Code using a conventional try/catch construct looks like this: String str1 = null; try { str1 = Files.getLastModifiedTime(p).toString(); } catch (IOException _ex) { str1 = "unknown"; } System.out.println("1: File time is: " + str1); // The same using Try: Try tc1 = Try.catching(() -> Files.getLastModifiedTime(p)); // Perform a transformation of the internal value. Here FileTime is mapped to its string representation. Try tc2 = tc1.map(FileTime::toString); String str2 = tc2.orElse("unknown"); System.out.println("2: File time is: " + str2); // The same on a single line: System.out.println("3: File time is: " + Try.catching(() -> Files.getLastModifiedTime(p).toString()).orElse("unknown")); // Similarly the class supports try-with-resources scenarios such as: List files = Try.withResources(() -> Files.walk(p), w -> { return w.filter(Files::isRegularFile) .map(Path::toFile) .collect(Collectors.toList()); }).orIgnore(); ``` -------------------------------- ### Get Major Version Source: https://github.com/spannm/ucanaccess/blob/master/docs/xref/net/ucanaccess/jdbc/UcanaccessDriver.html Retrieves the major version of the Ucanaccess driver. ```Java @Override public int getMajorVersion() { return VersionInfo.find(getClass()).getMajorVersion(); } ``` -------------------------------- ### Display Export Help Source: https://github.com/spannm/ucanaccess/blob/master/docs/30-jdbc-client-tools.html View available flags and usage instructions for the export command. ```text UCanAccess>export --help; ``` -------------------------------- ### Get Escaped Table Name Source: https://github.com/spannm/ucanaccess/blob/master/docs/xref/net/ucanaccess/converters/Metadata.html Retrieves the escaped name of a table. ```APIDOC ## GET /api/tables/escaped/{tableName} ### Description Retrieves the escaped name of a given table. ### Method GET ### Endpoint /api/tables/escaped/{tableName} ### Parameters #### Path Parameters - **tableName** (String) - Required - The name of the table. ### Response #### Success Response (200) - **String** - The escaped table name. Returns null if the table is not found. #### Response Example ```json "escaped_table_name" ``` ``` -------------------------------- ### time - Get Current Timestamp Source: https://github.com/spannm/ucanaccess/blob/master/docs/apidocs/net/ucanaccess/converters/Functions.html Retrieves the current system timestamp. ```APIDOC ## time ### Description Returns the current system time as a Timestamp object. ### Method `public static Timestamp time()` ### Response * Timestamp - The current system timestamp. ``` -------------------------------- ### Sql Factory Methods Source: https://github.com/spannm/ucanaccess/blob/master/docs/apidocs/net/ucanaccess/util/Sql.html Static methods to create Sql instances from various token inputs. ```APIDOC ## Static Methods ### `static Sql of(CharSequence... tokens)` Creates a `Sql` instance from a variable number of `CharSequence` tokens. ### `static Sql of(Iterable tokens)` Creates a `Sql` instance from an `Iterable` of `CharSequence` tokens. ``` -------------------------------- ### CreateForeignKeyCommand Methods Source: https://github.com/spannm/ucanaccess/blob/master/docs/apidocs/net/ucanaccess/commands/CreateForeignKeyCommand.html This section details the methods available for the CreateForeignKeyCommand class, including getters for command properties and methods for persistence and rollback. ```APIDOC ## CreateForeignKeyCommand Methods ### Description Provides methods to retrieve command details and manage its lifecycle. ### Methods #### `getExecId()` * **Description**: Retrieves the execution ID associated with the command. * **Returns**: `String` - The execution ID. #### `getRelationshipName()` * **Description**: Retrieves the name of the relationship. * **Returns**: `String` - The relationship name. #### `getTableName()` * **Description**: Retrieves the name of the table. * **Returns**: `String` - The table name. #### `getType()` * **Description**: Retrieves the type of the command. * **Returns**: `ICommand.CommandType` - The command type. #### `persist()` * **Description**: Persists the changes associated with the command. * **Returns**: `IFeedbackAction` #### `rollback()` * **Description**: Rolls back any changes made by the command. * **Returns**: `IFeedbackAction` ### Parameters None for these methods. ### Request Example None ### Response #### Success Response (200) None #### Response Example None ``` -------------------------------- ### GET /AccessVersion/getDefaultAccessVersion Source: https://github.com/spannm/ucanaccess/blob/master/docs/apidocs/net/ucanaccess/type/AccessVersion.html Retrieves the default Access version configured for the application. ```APIDOC ## GET /AccessVersion/getDefaultAccessVersion ### Description Returns the default AccessVersion instance used by the library. ### Method GET ### Response #### Success Response (200) - **AccessVersion** (enum) - The default Access version object. ``` -------------------------------- ### Instantiate Jackcess Opener Source: https://github.com/spannm/ucanaccess/blob/master/docs/xref/net/ucanaccess/jdbc/UcanaccessDriver.html Creates a new instance of a class that implements the IJackcessOpenerInterface. It uses a utility to handle potential exceptions during instantiation and throws a UcanaccessSQLException if the class cannot be instantiated or does not implement the required interface. ```Java private IJackcessOpenerInterface newJackcessOpenerInstance(String className) throws UcanaccessSQLException { Object instance = Try.catching(() -> Class.forName(className).getConstructor().newInstance()).orThrow(ex -> new UcanaccessSQLException("Failed to instantiate " + className, ex)); if (instance instanceof IJackcessOpenerInterface) { return (IJackcessOpenerInterface) instance; } throw new UcanaccessSQLException("Jackess Opener class must implement " + IJackcessOpenerInterface.class.getName()); } ``` -------------------------------- ### GET wasNull Source: https://github.com/spannm/ucanaccess/blob/master/docs/xref/net/ucanaccess/jdbc/UcanaccessResultSet.html Checks if the last column read had a value of SQL NULL. ```APIDOC ## GET wasNull ### Description Reports whether the last column read had a value of SQL NULL. ### Response #### Success Response (200) - **boolean** - Returns true if the last column read was SQL NULL, false otherwise. ### Error Handling - Throws **UcanaccessSQLException** if an underlying SQL error occurs. ``` -------------------------------- ### UcanaccessDatabaseMetadata Constructor Source: https://github.com/spannm/ucanaccess/blob/master/docs/apidocs/net/ucanaccess/jdbc/UcanaccessDatabaseMetadata.html Initializes a new instance of the UcanaccessDatabaseMetadata class. ```APIDOC ## UcanaccessDatabaseMetadata Constructor ### Description Initializes a new instance of the UcanaccessDatabaseMetadata class. ### Constructor `UcanaccessDatabaseMetadata(DatabaseMetaData wrapped, UcanaccessConnection connection)` ### Parameters - **wrapped** (DatabaseMetaData) - Required - The wrapped DatabaseMetaData object. - **connection** (UcanaccessConnection) - Required - The UcanaccessConnection associated with this metadata. ``` -------------------------------- ### Get Wrapped Statement Source: https://github.com/spannm/ucanaccess/blob/master/docs/xref/net/ucanaccess/jdbc/UcanaccessStatement.html Returns the underlying Statement object that this UcanaccessStatement is wrapping. ```java Statement getWrapped() { return wrapped; } ``` -------------------------------- ### UcanaccessDatabaseMetadata Constructor Source: https://github.com/spannm/ucanaccess/blob/master/docs/apidocs/net/ucanaccess/jdbc/UcanaccessDatabaseMetadata.html Initializes a new instance of the UcanaccessDatabaseMetadata class. ```APIDOC ## UcanaccessDatabaseMetadata Constructor ### Description Initializes a new instance of the UcanaccessDatabaseMetadata class. ### Method `public UcanaccessDatabaseMetadata(DatabaseMetaData _wrapped, UcanaccessConnection _connection)` ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Request Example None ### Response None #### Success Response (200) None #### Response Example None ``` -------------------------------- ### Get Generated Keys Source: https://github.com/spannm/ucanaccess/blob/master/docs/xref/net/ucanaccess/jdbc/UcanaccessStatement.html Retrieves the generated keys from the last executed statement. ```APIDOC ## getGeneratedKeys() ### Description Retrieves the generated keys from the last executed statement. ### Method `ResultSet` ### Endpoint N/A (Method within a JDBC Statement implementation) ### Parameters None ### Request Example N/A ### Response #### Success Response (200) - `ResultSet` - A `ResultSet` object containing the generated keys. #### Response Example ```json { "generatedKeys": "[ResultSet object representing generated keys]" } ``` ``` -------------------------------- ### GET /getConnection Source: https://github.com/spannm/ucanaccess/blob/master/docs/xref/net/ucanaccess/jdbc/UcanaccessDataSource.html Opens a connection to the Access database using the configured properties. ```APIDOC ## GET /getConnection ### Description Opens a connection to the Access database using the user name and password stored in the data source. ### Method GET ### Endpoint /getConnection ### Response #### Success Response (200) - **Connection** (java.sql.Connection) - The database connection object. ``` -------------------------------- ### Constructor: UcanaccessPreparedStatement Source: https://github.com/spannm/ucanaccess/blob/master/docs/apidocs/net/ucanaccess/jdbc/UcanaccessPreparedStatement.html Initializes a new instance of UcanaccessPreparedStatement. ```APIDOC ## Constructor: UcanaccessPreparedStatement ### Description Creates a new UcanaccessPreparedStatement instance using the provided normalized SQL, hidden PreparedStatement, and connection. ### Parameters - **_nsql** (NormalizedSQL) - Required - The normalized SQL object. - **_hidden** (PreparedStatement) - Required - The underlying hidden PreparedStatement. - **_conn** (UcanaccessConnection) - Required - The UcanaccessConnection instance. ### Throws - **SQLException** - Thrown if a database access error occurs. ``` -------------------------------- ### Get Parent Logger Source: https://github.com/spannm/ucanaccess/blob/master/docs/xref/net/ucanaccess/jdbc/UcanaccessDriver.html Throws SQLFeatureNotSupportedException as parent logger functionality is not supported. ```Java @Override public java.util.logging.Logger getParentLogger() throws SQLFeatureNotSupportedException { throw new SQLFeatureNotSupportedException(); } ``` -------------------------------- ### Configure Mirror Persistence Source: https://github.com/spannm/ucanaccess/blob/master/docs/40-change-log.html Use the keepMirror parameter to retain the HSQLDB mirror file after the VM terminates, which can improve startup performance for large databases. ```text jdbc:ucanaccess://c:/data/main.mdb;keepMirror=c:/data/mirrorName ``` -------------------------------- ### Get Table Name Source: https://github.com/spannm/ucanaccess/blob/master/docs/xref/net/ucanaccess/converters/Metadata.html Retrieves the original table name from its escaped version. ```APIDOC ## GET /api/tables/{tableName} ### Description Retrieves the original, unescaped table name based on its escaped version. Returns null if the table is not found. ### Method GET ### Endpoint /api/tables/{tableName} ### Parameters #### Path Parameters - **tableName** (String) - Required - The escaped name of the table. ### Response #### Success Response (200) - **String** - The original table name. Returns null if not found. #### Response Example ```json "original_table_name" ``` ``` -------------------------------- ### Custom Jackcess Encrypt Opener (UCanAccess 2.x.x) Source: https://github.com/spannm/ucanaccess/blob/master/docs/20-getting-started.html Implement `IJackcessOpenerInterface` for custom integration with Jackcess Encrypt, for example, to open Money (.mny) files. Requires `jackcess-encrypt.jar` and dependencies. The `AutoSync=false` setting is recommended for performance. ```java package yourPackage.example; //imports from Jackcess Encrypt import io.github.spannm.jackcess.CryptCodecProvider; import io.github.spannm.jackcess.Database; import io.github.spannm.jackcess.DatabaseBuilder; import net.ucanaccess.jdbc.IJackcessOpenerInterface; import java.io.File; import java.io.IOException; public class CryptCodecOpener implements IJackcessOpenerInterface { public Database open(File fl, String pwd) throws IOException { DatabaseBuilder dbd = new DatabaseBuilder(fl); dbd.setAutoSync(false); dbd.setCodecProvider(new CryptCodecProvider(pwd)); dbd.setReadOnly(false); return dbd.open(); } // Notice that the parameter setting AutoSync=false is recommended with UCanAccess for performance reasons. // UCanAccess flushes the updates to disk at transaction end. // For more details about autosync parameter (and related tradeoff), see the Jackcess documentation. } ``` ```java Class.forName("net.ucanaccess.jdbc.UcanaccessDriver"); Connection conn = DriverManager.getConnection("jdbc:ucanaccess:///opt/prova1.mny;jackcessOpener=yourPackage.example.CryptCodecOpener", "sa", password); ... ``` -------------------------------- ### Manage Connection and SQL Preprocessing Source: https://github.com/spannm/ucanaccess/blob/master/docs/xref/net/ucanaccess/jdbc/UcanaccessConnection.html Methods for handling HSQLDB connections, retrieving generated keys, and preprocessing SQL statements for identity columns. ```java Object getLastGeneratedKey() { return lastGeneratedKey; } String preprocess(String sql) { if (SQLConverter.hasIdentity(sql)) { return SQLConverter.preprocess(sql, lastGeneratedKey); } return sql; } void setCurrentStatement(UcanaccessStatement _currentStatement) { currentStatement = _currentStatement; } public void setGeneratedKey(Object key) { lastGeneratedKey = key; if (currentStatement != null) { currentStatement.setGeneratedKey(key); } } ``` -------------------------------- ### Get Table ID Source: https://github.com/spannm/ucanaccess/blob/master/docs/xref/net/ucanaccess/converters/Metadata.html Retrieves the unique identifier for a given table name. ```APIDOC ## GET /api/tables/id/{tableName} ### Description Fetches the integer ID associated with a table name. Returns -1 if the table is not found. ### Method GET ### Endpoint /api/tables/id/{tableName} ### Parameters #### Path Parameters - **tableName** (String) - Required - The escaped name of the table. ### Response #### Success Response (200) - **Integer** - The table ID. Returns -1 if the table is not found. #### Response Example ```json 123 ``` ``` -------------------------------- ### DBReferenceSingleton - Get Reference Source: https://github.com/spannm/ucanaccess/blob/master/docs/xref/net/ucanaccess/jdbc/DBReferenceSingleton.html Retrieves a database reference based on the provided file. ```APIDOC ## GET /api/db-reference-singleton/reference ### Description Retrieves a database reference associated with the given file. ### Method GET ### Endpoint /api/db-reference-singleton/reference ### Query Parameters - **ref** (File) - Required - The file for which to retrieve the database reference. ### Response #### Success Response (200) - **DBReference** (object) - The database reference object if found, otherwise null. #### Response Example ```json { "reference": { "filePath": "/path/to/database.accdb", "fileFormat": "V2010", "password": null, "charset": "UTF-8" } } ``` ``` -------------------------------- ### IJackcessOpenerInterface.open Source: https://github.com/spannm/ucanaccess/blob/master/docs/apidocs/net/ucanaccess/jdbc/DefaultJackcessOpener.html Methods to open a database file using the IJackcessOpenerInterface. ```APIDOC ## open(File fl, String pwd) ### Description Opens a database file with a specified password. ### Parameters #### Parameters - **fl** (File) - Required - The database file to open. - **pwd** (String) - Required - The password for the database. ### Response - **Database** (io.github.spannm.jackcess.Database) - Returns the opened database instance. --- ## open(File fl, String pwd, Charset charset) ### Description Opens a database file with a specified password and character set. ### Parameters #### Parameters - **fl** (File) - Required - The database file to open. - **pwd** (String) - Required - The password for the database. - **charset** (Charset) - Required - The character set to use for the database. ### Response - **Database** (io.github.spannm.jackcess.Database) - Returns the opened database instance. ``` -------------------------------- ### Get Column Names Source: https://github.com/spannm/ucanaccess/blob/master/docs/xref/net/ucanaccess/converters/Metadata.html Retrieves a list of column names for a given table. ```APIDOC ## GET /api/columns ### Description Retrieves a list of column names for a specified table. If the table name is the system subquery, it returns null. ### Method GET ### Endpoint /api/columns ### Parameters #### Query Parameters - **tableName** (String) - Required - The name of the table to retrieve column names from. ### Response #### Success Response (200) - **List** - A list of column names. Returns null if the table name is the system subquery. #### Response Example ```json ["column1", "column2", "column3"] ``` ``` -------------------------------- ### Specify Mirror Database Directory Source: https://github.com/spannm/ucanaccess/blob/master/docs/20-getting-started.html Use `mirrorFolder` to set the directory for the mirror database. Forces `memory=false`. Example uses the system temp folder. ```text mirrorFolder=java.io.tmpdir ``` -------------------------------- ### BlobKey Constructor Summary Source: https://github.com/spannm/ucanaccess/blob/master/docs/apidocs/net/ucanaccess/jdbc/BlobKey.html Details the constructors for creating BlobKey instances. ```APIDOC ## Constructor Summary ### `BlobKey(io.github.spannm.jackcess.Table _table, String _columnName, io.github.spannm.jackcess.Row _row)` * **Description:** Constructs a BlobKey using table, column name, and row information. ### `BlobKey(Map _key, String _tableName, String _columnName)` * **Description:** Constructs a BlobKey using a key map, table name, and column name. ``` -------------------------------- ### Get Table Name Source: https://github.com/spannm/ucanaccess/blob/master/docs/xref/net/ucanaccess/converters/Metadata.html Retrieves the name of a table based on its escaped name. ```java public String getTableName(String _escapedName) throws SQLException { ``` -------------------------------- ### Get Stored Exception Source: https://github.com/spannm/ucanaccess/blob/master/docs/xref/net/ucanaccess/converters/ParametricQuery.html Returns the last SQLException that occurred during query execution, if any. ```java public Exception getException() { return exception; } ``` -------------------------------- ### IJackcessOpenerInterface - open(File, String) Source: https://github.com/spannm/ucanaccess/blob/master/docs/apidocs/net/ucanaccess/jdbc/IJackcessOpenerInterface.html Opens a Jackcess database file with the specified password. This method may throw an IOException. ```APIDOC ## open(File, String) ### Description Opens a Jackcess database file with the specified password. ### Method `open` ### Endpoint N/A (Interface Method) ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Request Example ```java // Example usage within an implementing class Database db = jackcessOpener.open(new File("path/to/database.accdb"), "password"); ``` ### Response #### Success Response (200) - **io.github.spannm.jackcess.Database** - The opened Jackcess database object. #### Response Example ```java // Success is indicated by the return of a Database object. ``` ### Error Handling Throws: - `IOException` - If an I/O error occurs during database opening. ``` -------------------------------- ### GET /getConnection Source: https://github.com/spannm/ucanaccess/blob/master/docs/apidocs/net/ucanaccess/jdbc/UcanaccessDataSource.html Opens a connection to the Access database using the default configuration. ```APIDOC ## GET /getConnection ### Description Opens the connection to the Access database. ### Method GET ### Endpoint /getConnection ### Response #### Success Response (200) - **Connection** (java.sql.Connection) - The database connection object. #### Errors - **SQLException** - Thrown if a database access error occurs. ``` -------------------------------- ### Create Database Tables Source: https://github.com/spannm/ucanaccess/blob/master/docs/xref/net/ucanaccess/converters/LoadJet.html Initializes metadata and iterates through database tables to create them, skipping linked ODBC tables. ```java private void createTables() throws SQLException, IOException { metadata.createMetadata(); for (String tn : dbIO.getTableNames()) { if (tn.startsWith("~")) { logger.log(Level.DEBUG, "Skipping table '{0}'", tn); continue; } try { Table jt = dbIO.getTable(tn); UcanaccessTable ut = new UcanaccessTable(jt, tn); if (TableMetaData.Type.LINKED_ODBC == jt.getDatabase().getTableMetaData(tn).getType()) { logger.log(Level.WARNING, "Skipping table '{0}' (linked to an ODBC table)", tn); unresolvedTables.add(tn); continue; } createTable(ut); loadingOrder.add(ut.getName()); } catch (Exception _ex) { logger.log(Level.WARNING, "Failed to create table '{0}': {1}", tn, _ex.getMessage()); ``` -------------------------------- ### net.ucanaccess.ext Package Source: https://github.com/spannm/ucanaccess/blob/master/docs/xref/net/ucanaccess/ext/package-summary.html Overview of the net.ucanaccess.ext package, listing its classes. ```APIDOC ## Package net.ucanaccess.ext ### Description This package contains extensions for UCanAccess. ### Classes * [FunctionType](FunctionType.html#FunctionType "class in net.ucanaccess.ext") ``` -------------------------------- ### Get DBReferenceSingleton Instance Source: https://github.com/spannm/ucanaccess/blob/master/docs/apidocs/net/ucanaccess/jdbc/class-use/DBReferenceSingleton.html This snippet shows how to retrieve the singleton instance of DBReferenceSingleton. ```APIDOC ## GET DBReferenceSingleton ### Description Retrieves the singleton instance of the DBReferenceSingleton class. This class is used for managing database references within the UCanAccess driver. ### Method GET ### Endpoint N/A (This is a static method call within the Java library) ### Parameters None ### Request Example ```java DBReferenceSingleton instance = DBReferenceSingleton.getInstance(); ``` ### Response #### Success Response (Instance) - **DBReferenceSingleton** (DBReferenceSingleton) - The singleton instance of DBReferenceSingleton. #### Response Example ```java // The returned object is an instance of DBReferenceSingleton ``` ``` -------------------------------- ### CreateForeignKeyCommand Constructor Source: https://github.com/spannm/ucanaccess/blob/master/docs/apidocs/net/ucanaccess/commands/CreateForeignKeyCommand.html This constructor initializes a new CreateForeignKeyCommand object. It requires the table name, the referenced table name, an execution ID, and a relationship name. ```APIDOC ## CreateForeignKeyCommand Constructor ### Description Initializes a new CreateForeignKeyCommand object. ### Method `CreateForeignKeyCommand(String _tableName, String _referencedTable, String _execId, String _relationshipName)` ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Request Example None ### Response #### Success Response (200) None #### Response Example None ``` -------------------------------- ### Handle UcanaccessSQLException Source: https://github.com/spannm/ucanaccess/blob/master/docs/xref/net/ucanaccess/jdbc/UcanaccessDriver.html Catches general exceptions during connection setup and re-throws them as a UcanaccessSQLException. ```Java } catch (Exception _ex) { throw new UcanaccessSQLException(_ex); ```