Package org.uploadDB.core

Examples of org.uploadDB.core.ParseFile


  private InsertTable it;

  public void CreateTable (ConnectionScreen cs, ConnectController cc, CSVParserController csvc) {

    //Create a parsefile object.
    ParseFile pf = new ParseFile(false);

    //Let the parse file methods analyse the file to get the field values and the field length.   
    pf.ReadFirstLine(cs.getFileOpen().getSelectedFile());
    pf.AnalyseFile(cs.getFileOpen().getSelectedFile());

    //Set the db connection for the createtable object
    ct = new CreateTable();
    ct.setDbCon(cc.getDbCon());   
    ct.setTableName(cs.getFTableName().getText());   
    ct.createtable(cc.getDbCon(), pf.getTableLayout(), pf.getFieldLength());

    //Create an inserttable object and sets it name.
    it = new InsertTable(false);   
    it.setDbCon(cc.getDbCon());
    it.setTableName(cs.getFTableName().getText());
    it.ReadFile(cc.getDbCon(), cs.getFileOpen().getSelectedFile(), pf.getTableLayout(),pf.getCsvStrat());

    //Disconnect from DB
    try {
      cc.getDbCon().disConnect();
    } catch (Exception e) {
View Full Code Here

TOP

Related Classes of org.uploadDB.core.ParseFile

Copyright © 2018 www.massapicom. 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.