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