Package org.tmatesoft.sqljet.core.table

Examples of org.tmatesoft.sqljet.core.table.ISqlJetTable.open()


        System.out.println();
        System.out.println(">After deletion in row id order:");
        System.out.println();
        db.beginTransaction(SqlJetTransactionMode.READ_ONLY);
        try {
            printRecords(table.open());
        } finally {
            db.commit();
        }

        db.beginTransaction(SqlJetTransactionMode.WRITE);
View Full Code Here


        db.beginTransaction(SqlJetTransactionMode.WRITE);
        ISqlJetCursor updateCursor = null;
        try {
            table.insert("Smith", "John", 0);
            calendar.setTime(new Date(System.currentTimeMillis()));
            updateCursor = table.open();
            do {
                updateCursor.update(updateCursor.getValue(SECOND_NAME_FIELD), updateCursor.getValue(FIRST_NAME_FIELD), calendar.getTimeInMillis());
            } while(updateCursor.next());
        } finally {
            updateCursor.close();
View Full Code Here

    db.createTable("CREATE TABLE record (a NONE NOT NULL)");
    ISqlJetTable table = db.getTable("record");
    table.insert("10");
    db.beginTransaction(SqlJetTransactionMode.READ_ONLY);
    try {
      ISqlJetCursor cursor = table.open();
      boolean more = !cursor.eof();
      while (more) {
        String s = cursor.getString(0);
        Assert.assertEquals(2, s.length());
        more = cursor.next();
View Full Code Here

    try {

      // Remove all rows
      ISqlJetCursor curseur = null;
      final ISqlJetTable tableDossiers = db.getTable("test");
      curseur = tableDossiers.open();
      while (!curseur.eof()) {
        curseur.delete();
      }
      curseur.close();
View Full Code Here

            db.commit();
        }

        db.runReadTransaction(new ISqlJetTransaction() {
            public Object run(SqlJetDb db) throws SqlJetException {
                ISqlJetCursor open = table.open();
                try {
                    while (!open.eof()) {
                        long id = open.getInteger("id");
                        Assert.assertNotNull(id);
                        open.next();
View Full Code Here

    private static class Reader implements ISqlJetTransaction {
        public Object run(SqlJetDb db) throws SqlJetException {
            final ISqlJetTable table = db.getTable(TABLE);
            int n_read = 0;
            final ISqlJetCursor cursor = table.open();
            try {
                boolean more = !cursor.eof();
                while (n_read < TOTAL && more  && !exit.get()) {
                    n_read++;
                    cursor.getInteger(0);
View Full Code Here

            {
                db.beginTransaction(SqlJetTransactionMode.READ_ONLY);
                try
                {
                    ISqlJetTable table = db.getTable("RssReader");
                    ISqlJetCursor cursor = table.open();
                    try
                    {
                        do
                        {
                            final String feedLanguage = cursor.getString("language");
View Full Code Here

            {
                db.beginTransaction(SqlJetTransactionMode.READ_ONLY);
                try
                {
                    ISqlJetTable table = db.getTable("HtmlReader");
                    ISqlJetCursor cursor = table.open();
                    try
                    {
                        do
                        {
                            final String siteLanguage = cursor.getString("language");
View Full Code Here

                {
                    db.beginTransaction(SqlJetTransactionMode.WRITE);
                    try
                    {
                        ISqlJetTable table = db.getTable("articles");
                        ISqlJetCursor cursor = table.open();
                        try
                        {
                            //- - - - - - - - - - - - - - -
                            // For each entry in the
                            // "articles" table...
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.