programming-examples/perl/Database/Delete records in a database with OLE connection.pl

18 lines
384 B
Perl
Raw Normal View History

2019-11-15 12:59:38 +01:00
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");
print "Content-type: text/html\n\n";
$conn->Open("address");
$conn->Execute("DELETE * FROM $table WHERE firstname='A'");
print "Record Deleted ...";
$rs->Close;
$conn->Close;