Tag Archives: DBI

Perl DBI Connect Example

Here is a sample code snippet to connect and access an informix database using Perl DBI #!/usr/bin/perl # DBI moduleuse DBI ; # Database handler$dbh = DBI->connect("DBI:Informix:$db_name"); # Statement handler$sth = $dbh->prepare("$sql"); # Execute statement$sth->execute(); # For each row in the tablewhile (@row = $sth->fetchrow_array()){ …

Read more »