s.sep = "|"; s.showHeader = false; s.db = new Database(); String dbname = null, sql = null; for (int i = 0; i < args.length; i++) { s.db.open(dbname, 0); } catch (Exception e) { System.err.println("Unable to open database: " + e); s.db.key(key); } catch (Exception e) { System.err.println("Unable to set key: " + e); s.db.close(); } catch (Exception ee) {
/** * Initiate a database backup, SQLite 3.x only. * * @param dest destination database * @param destName schema of destination database to be backed up * @param srcName schema of source database * @return Backup object to perform the backup operation */ public Backup backup(Database dest, String destName, String srcName) throws SQLite.Exception { synchronized(this) { Backup b = new Backup(); _backup(b, dest, destName, this, srcName); return b; } }
/** * Establish a busy callback method which gets called when * an SQLite table is locked. * * @param bh the object implementing the busy callback method */ public void busy_handler(SQLite.BusyHandler bh) { synchronized(this) { _busy_handler(bh); } }
/** * Create regular function. * * @param name the name of the new function * @param nargs number of arguments to function * @param f interface of function */ public void create_function(String name, int nargs, Function f) { synchronized(this) { _create_function(name, nargs, f); } }
/** * Set the timeout for waiting for an SQLite table to become * unlocked. * * @param ms number of millisecond to wait */ public void busy_timeout(int ms) { synchronized(this) { _busy_timeout(ms); } }
/** * Return the number of changed rows for the last statement. */ public long changes() { synchronized(this) { return _changes(); } }
/** * See if an SQL statement is complete. * Returns true if the input string comprises * one or more complete SQL statements. * * @param sql the SQL statement to be checked */ public synchronized static boolean complete(String sql) { return _complete(sql); }
/** * Create aggregate function. * * @param name the name of the new function * @param nargs number of arguments to function * @param f interface of function */ public void create_aggregate(String name, int nargs, Function f) { synchronized(this) { _create_aggregate(name, nargs, f); } }
/** * Close the underlying SQLite database file. */ public void close() throws SQLite.Exception { synchronized(this) { _close(); } }
s = NotesFactory.createSession(); // Get the local address book Database nab = s.getDatabase("",s.getAddressBooks().elementAt(0).toString()); if (nab.isOpen() == false) nab.open(); // Get the Birthdays & Anniversaries view View baview = nab.getView("BA"); ViewEntryCollection eba = baview.getAllEntries(); ViewEntry entry = eba.getFirstEntry(); list = new String[eba.getCount()]; int count = 0; while (entry != null) { Vector vals = entry.getColumnValues(); list[count]= vals.elementAt(1).toString() + " " + vals.elementAt(2).toString(); entry = eba.getNextEntry(); count++; }
/** * Create regular function. * * @param name the name of the new function * @param nargs number of arguments to function * @param f interface of function */ public void create_function(String name, int nargs, Function f) { synchronized(this) { _create_function(name, nargs, f); } }
/** * Set the timeout for waiting for an SQLite table to become * unlocked. * * @param ms number of millisecond to wait */ public void busy_timeout(int ms) { synchronized(this) { _busy_timeout(ms); } }
/** * Return the number of changed rows for the last statement. */ public long changes() { synchronized(this) { return _changes(); } }
/** * See if an SQL statement is complete. * Returns true if the input string comprises * one or more complete SQL statements. * * @param sql the SQL statement to be checked */ public synchronized static boolean complete(String sql) { return _complete(sql); }
/** * Create aggregate function. * * @param name the name of the new function * @param nargs number of arguments to function * @param f interface of function */ public void create_aggregate(String name, int nargs, Function f) { synchronized(this) { _create_aggregate(name, nargs, f); } }
/** * Close the underlying SQLite database file. */ public void close() throws SQLite.Exception { synchronized(this) { _close(); } }
s.sep = "|"; s.showHeader = false; s.db = new Database(); String dbname = null, sql = null; for (int i = 0; i < args.length; i++) { s.db.open(dbname, 0); } catch (Exception e) { System.err.println("Unable to open database: " + e); s.db.key(key); } catch (Exception e) { System.err.println("Unable to set key: " + e); s.db.close(); } catch (Exception ee) {
/** * Create regular function. * * @param name the name of the new function * @param nargs number of arguments to function * @param f interface of function */ public void create_function(String name, int nargs, Function f) { synchronized(this) { _create_function(name, nargs, f); } }
/** * Establish a busy callback method which gets called when * an SQLite table is locked. * * @param bh the object implementing the busy callback method */ public void busy_handler(SQLite.BusyHandler bh) { synchronized(this) { _busy_handler(bh); } }
/** * Set the timeout for waiting for an SQLite table to become * unlocked. * * @param ms number of millisecond to wait */ public void busy_timeout(int ms) { synchronized(this) { _busy_timeout(ms); } }