Results 1 to 3 of 3
  1. #1
    Join Date
    Jul 2004
    Posts
    62

    Unanswered: Create table in JAVA

    Dear all
    How do i create table in database in Java Code, should i use Statement and execute().
    Thank you

  2. #2
    Join Date
    Jan 2005
    Posts
    362

    Jdbc

    JDBC
    This tutorial will help you

  3. #3
    Join Date
    Apr 2006
    Location
    INDIA
    Posts
    1

    I hope this function can help you creating database table in java using jdbc

    Code:
    private boolean createTables(Connection dbConnection) {
            boolean bCreatedTables = false;
            Statement statement = null;
            try {
                statement = dbConnection.createStatement();
                statement.execute(strCreateAddressTable);
                bCreatedTables = true;
            } catch (SQLException ex) {
                ex.printStackTrace();
            }
            
            return bCreatedTables;
        }
    Ravinderjit Singh Sidhu
    Ludhiana, INDIA

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •