#!c:/perl/bin
use Win32::OLE;
use Win32::OLE::Const 'Microsoft ActiveX Data Objects';
$table = "employee";
$conn = Win32::OLE->new("ADODB.Connection");
$rs = Win32::OLE->new("ADODB.Recordset");
$conn->Open("contact");
print "Content-Type:text/html\n\n";
print "Contact Database
";
print "";
print "";
print "ID ";
print "First Name ";
print "Last Name ";
print "Town ";
print "Edit? ";
print " ";
$sql = "SELECT * FROM $table";
$rs->Open($sql, $conn, 1, 1);
while(!$rs->EOF){
$id = $rs->Fields('id')->value;
$firstname = $rs->Fields('firstname')->value;
$lastname = $rs->Fields('lastname')->value;
$town = $rs->Fields('town')->value;
print "$id $firstname $lastname $town ";
print "";
print " ";
$rs->MoveNext;
}
print "