I am in the midst of a project and have come across two delima's. Currently have a project in which I have to enumerate thru an external source. I have everything written to download to a file but now need to find a way to do two things for which I am at a loss. First one is to parse results from the enumeration to only include part of the result string and second is to send the results to a database. I have the database connection aspect figured out just now how to get the results to go to it.
AccountName field value is formatted like number "Space" name and I just need to get the number value and remove the name. Database is a SQL Database. Any help would be so appreciative.
Excerpt of the code with the enumeration.
Enumeration enumReportFields = generalQuery.getAvailableReportFields();
ReportFieldSet fieldSet = generalQuery.getReportFieldSet();
ReportField reportField = (ReportField) enumReportFields.nextElement();
ReportMetricSet reportMetricSet = generalQuery.getReportMetricSet();
Enumeration enumReportMetrics = generalQuery.getAvailableReportMetrics();
ReportMetric reportMetric = ((ReportMetric)enumReportMetrics.nextElement());
As of this moment the results are going to a file via an inputstream/fileoutputstream.