设置文本表hsqldb java异常

设置文本表hsqldb java异常,java,database,file,exception,hsqldb,Java,Database,File,Exception,Hsqldb,我有一个保存在txt文件中的矩阵,我想将其加载到hsqldb表中,其中矩阵中的每一列都加载到表中的一列中 这就是我所做的 kId= new String[numOfFields]; String f=""; String ff=""; String fff=""; for (int i=0;i<kId.length;i++) { while(rss.next())

我有一个保存在txt文件中的矩阵,我想将其加载到hsqldb表中,其中矩阵中的每一列都加载到表中的一列中

这就是我所做的

kId= new String[numOfFields];
        String f="";
        String ff="";
        String fff="";
            for (int i=0;i<kId.length;i++) {
                while(rss.next())   
                {
                kId[i]=rss.getString(1);
                f="a"+kId[i]+ " varchar(7)";
                ff+="a"+kId[i]+", ";
                fff+="a"+kId[i]+ " varchar(7), ";
                String sqlalter=new String("ALTER TABLE "+ tableName +" add "+f+"");
                //System.out.println(sqlalter);
                stmt1.executeUpdate(sqlalter);
            }

        }
            f=f.substring(0, f.length()-1);
            ff = ff.replaceAll(", $","");
            fff = fff.replaceAll(", $","");

        String sqlmatrixcreate=new String ("CREATE TEXT TABLE tempMatrixTable " + " ("+fff+") ");
        //System.out.print(sqlmatrixcreate);
        stmt1.executeUpdate(sqlmatrixcreate);
        String setTempMatrixTable= new String ("set table "+"tempMatrixTable"+ " ("+ff+") " + " source 'matrix.txt'");
        stmt1.executeUpdate( setTempMatrixTable);
        String insertWeight=  new String("INSERT INTO "+ tableName +"("+ff+")"+ " select weight from tempMatrixTable");
        System.out.print(insertWeight);
        stmt1.executeUpdate(insertWeight);
        String dropTempWeight= new String("drop table tempMatrixTable");
        //stmt1.executeUpdate(dropTempKey);
请引导我


谢谢

表格名称后面不应该有开括号:

String setTempMatrixTable= new String ("set table "+"tempMatrixTable"+ " source 'matrix.txt'");
String setTempMatrixTable= new String ("set table "+"tempMatrixTable"+ " source 'matrix.txt'");