首页 / 浏览问题 / 组件 / 问题详情
在 java代码里面就打不开,报错,提示"没有系统表,且非扩展打
2月25日, 2021
public  Datasets getDataSet(DataBaseDto dataBaseDto, Workspace workspace){
        Datasources datasources = workspace.getDatasources();
        DatasourceConnectionInfo datasourceConnectionInfo = new DatasourceConnectionInfo();
        datasourceConnectionInfo.setEngineType(dataBaseDto.getEngineType());
        if(dataBaseDto.getDriver()!=null){
            datasourceConnectionInfo.setDriver(dataBaseDto.getDriver());
        }
        datasourceConnectionInfo.setServer(dataBaseDto.getServer());

        if (dataBaseDto.getEngineType().equals(EngineType.SQLPLUS)) {
            datasourceConnectionInfo.setDatabase(dataBaseDto.getDatabase());
        }
        datasourceConnectionInfo.setUser(dataBaseDto.getUsername());
        datasourceConnectionInfo.setPassword(dataBaseDto.getPassword());
        datasourceConnectionInfo.setAlias(dataBaseDto.getServer());
        String database = datasourceConnectionInfo.getDatabase();
        if(StringUtils.isNotBlank(database)){
            log.info("数据库名称--"+database);
        }
        Datasource datasource = datasources.open(datasourceConnectionInfo);
        //得到数据集集合类,模板方式新建点数据集
        Datasets datasets = datasource.getDatasets();
        String datasetVectorName = "del_recordset";
        if (datasets.contains(datasetVectorName))
            datasets.delete(datasetVectorName);

        return datasets;
    }

1个回答

你好,您在idesktop上用这个参数能够打开该数据源吗?
张亮  (2,842分)  名扬四海
2月25日, 2021
idesktop 可以打开
...