#!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 ""; print ""; $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 ""; $rs->MoveNext; } print "
First NameLast NameAddress
$firstname$lastname$address
"; $rs->Close; $conn->Close;