Omar Cornejo | 2006-04-21 11:53:07.0 | |
| I'm using your product to update my tables and indexes with very good results, i'm very satisfied.
But in the migration proccess, because it was too fast, i have to make 2 changes to the original application: 1. Make the dbf's and ntx's files exists in the same directory. Before i had the estructure data\dbf\*.dbf and data\ntx\*.ntx. I would like to return to the previous directory estructure, for maintenance reasons. I have many dbf's and many more ntx's. 2. Some indexes, in the past, where created using the "DESCENDING" command. But that indexes have not been updated by your product until i have changed it to "ASCENDING" (or not ordinal directive). Is there a way to update indexes created with the "DESCENDING" directive?. Thanks, and best regards | ||
HXTT Support | 2006-04-22 04:07:47.0 | |
| >2. Some indexes, in the past, where created using the "DESCENDING" command.
> But that indexes have not been updated by your product Supported in the latest package. >Before i had the estructure data\dbf\*.dbf and data\ntx\*.ntx. I would like > to return to the previous directory estructure, for maintenance reasons. I > have many dbf's and many more ntx's. You need some cgp files to tell HXTT DBF where to find your ntx files. 1st solution (only for the latest package): try { File dataDir=new File("/data/dbf"); File[] fileLists=dataDir.listFiles(); for(int i=0;i String ntxPath="../ntx/"+fileLists[i].getName().substring(0,fileLists[i].getName().length()-3)+"NTX"; File ntxFile=new File(dataDir,ntxPath); if(ntxFile.isFile()){ com.hxtt.sql.dbf.OpenAPI.addIndexInfoToCGP(dataDir.getPath(),fileLists[i].getName(),ntxPath); } } } } catch (Exception e) { System.out.println(e.getMessage()); e.printStackTrace(); } 2nd solution: try { File dataDir=new File("/data/dbf"); File[] fileLists=dataDir.listFiles(); for(int i=0;i String tableName=fileLists[i].getName().substring(0,fileLists[i].getName().length()-4); String ntxPath="../ntx/"+tableName+".NTX"; File ntxFile=new File(dataDir,ntxPath); if(ntxFile.isFile()){ File cgpFile=new File(dataDir,tableName+".CGP"); PrintStream ps=new PrintStream(new FileOutputStream(cgpFile,true)); ps.println(ntxPath); ps.close(); } } } } catch (Exception e) { System.out.println(e.getMessage()); e.printStackTrace(); } | ||