But I am getting following error, DBD::Informix - (warning) INFORMIXDIR not set! DBI connect('testdb','',...) failed: SQL: -25596: The INFORMIXSERVER value is no t listed in the sqlhosts file or the Registry. at C:\perlJunk\DBItestdb.pl line 11 Can't call method "prepare" on an undefined value at C:\perlJunk\DBItestdb.pl line 13. Can any one suggest me where I this error means and how can I do successful connection?Please Cheersuse DBI; my $dbh = DBI->connect("dbi:Informix:testdb"); my $sth = $dbh->prepare('select * from testdb.dbo.Flight') or die "Couldn't prepare statement: " . $dbh->errstr; $sth->execute(); while( @data = $sth->fetchrow_array()) { foreach(@data) { print "[$_]"; } print "\n\n"; } $sth->finish; $dbh->disconnect;
In reply to Perl DBI Informix by Sun751
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |