【问题原因】临时数据源,和普通的文件型UDB数据源的存储方法是一样的,只是存储位置不一样,临时数据源存储位置是到内存中的。 【解决方法】新建内存型数据源,具体代码如下: DatasourceConnectionInfo info = new DatasourceConnectionInfo(); // 设置数据源存储位置为内存中,类型为UDB // Set the location of the datasource to the memory, in the type of UDB. info.setServer(":memory:"); info.setEngineType(EngineType.UDB); 可参考下安装完整包中的范例程序MemoryDatasource,如图安装包内位置所示