Insert value with OLE connection : OLE ADO « Database « Perl






Insert value with OLE connection

   

#!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");
$conn->Execute("INSERT INTO $table (firstname, lastname, address)
      VALUES ('A','B', 'C')");

print "Content-type: text/html\n\n";

print "Record Added ...";

$rs->Close;
$conn->Close;

   
    
    
  








Related examples in the same category

1.Delete records in a database with OLE connection
2.Connect with OLE