Java JDBC Sqlite Connection removeLabel()

Here you can find the source of removeLabel()

Description

remove Label

License

Apache License

Declaration

public static void removeLabel() 

Method Source Code


//package com.java2s;
//License from project: Apache License 

import java.sql.Connection;
import java.sql.DriverManager;

import java.sql.Statement;

public class Main {
    public static void removeLabel() {
        Connection c = null;//from  ww  w.  j a v a2s  . com
        Statement stmt = null;
        try {
            Class.forName("org.sqlite.JDBC");
            c = DriverManager.getConnection("jdbc:sqlite:dbs/newpress.db");
            c.setAutoCommit(true);
            // System.out.println("Opened database successfully");

            stmt = c.createStatement();
            stmt.executeUpdate("DELETE from DOC_LABEL;");
            stmt.close();
            c.close();
        } catch (Exception e) {
            System.err.println(e.getClass().getName() + ": " + e.getMessage());
            System.exit(0);
        }

    }
}

Related

  1. getSenatorProp(String topicId)
  2. getSQLiteConnection()
  3. getUniqLabels()
  4. modify(String sql)
  5. query(String sql)
  6. runSetupScript(final String setupScriptPath)