get Statement - Java java.sql

Java examples for java.sql:Statement

Description

get Statement

Demo Code


//package com.java2s;
import java.sql.Connection;

import java.sql.SQLException;
import java.sql.Statement;

public class Main {

    public static Statement getStatement(Connection conn) {
        Statement stmt = null;//from w w w.j  av a2s  .  c  o m
        try {
            stmt = conn.createStatement();
        } catch (SQLException e) {
            e.printStackTrace();
        }

        return stmt;
    }
}

Related Tutorials