#!/usr/local/bin/perl -w
#use strict;
use DBI;
use DBD::Informix;
my $dbh=DBI->connect("dbi:Informix:ds");
$sth=$dbh->prepare("select ima01 from ima_file");
$sth->execute();
while(@ary=$sth->fetchrow_array())
{
print ("\n",@ary),"\n";
}
$sth->finish();
$dbh->disconnect();
exit(0);
来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/16381228/viewspace-714068/,如需转载,请注明出处,否则将追究法律责任。
转载于:http://blog.itpub.net/16381228/viewspace-714068/
本文展示了如何使用Perl编程语言连接并查询Informix数据库,通过实例代码演示了数据库连接、执行SQL查询及结果处理的过程。
718

被折叠的 条评论
为什么被折叠?



