1

我有一个 perl 代码,我们正在读取 .txt 文件,但现在尽管有 .txt,但我们想从 H2DB 数据库中读取数据。我试图搜索,似乎没有可用的模块。你们中的一些人可以帮忙吗?

4

1 回答 1

1

H2 支持 Postgresql 网络协议,所以你可以尝试使用 postgres 的驱动来做到这一点

以下是您可以使用的模块:

use DBI;

$dbh = DBI->connect("dbi:Pg:dbname=$dbname", "", "");

# for some advanced uses you may need PostgreSQL type values:
use DBD::Pg qw(:pg_types);

 # See the DBI module documentation for full details
于 2013-04-17T07:56:59.743 回答