in reply to Inserting records in MS Access
You may find that ADO is actually quite a solid and well-designed database access API. The specification for it can be found in MSDN.use Win32::OLE; use Win32::ADO; # just a set of constants for ADO my $conn = Win32::OLE->new('ADODB.Connection'); $conn->Open('database'); my $rs = Win32::OLE->new('ADODB.Recordset'); $rs->Open("table", $conn, adOpenDynamic, adCmdTable); for my $item (@items) { $rs->Movefirst; $rs->Find("ItemID = ".$$item{'ItemID'}); if ($rs->{EOF}) { $rs->AddNew(["ItemID", "EndDate", "Relisted", "RelistClass", " +RelistKey"], [$$item{'ItemID'}, $item_endtime, 0, $$item{'Relis +tClass'}, $$item{'Key'}]); } else { $rs->Fields('Relisted')->{Value} = 0; $rs->Update } }
|
|---|