in reply to Undescribed problem with Win32::OLE

Using the incredibly powerful PSI::ESP module, I think I've figured out your problem. Your last $sql variable contains placeholders, but you can't bind values by just listing them after the string! Change that to something like this:

$sql = "INSERT INTO blah (blah, blah...)" . "VALUES ($an, $ct, ...)";
which will interpolate the variables right into your VALUES clause. If any of them are strings, you'll have to put quotes around the value in the SQL string: "VALUES ('$str1', '$str2', $num)"And don't forget to Execute the resulting SQL. Right now it looks like you're just throwing the string away.

This is all guesswork, BTW ;-) Hope it helps.

Update
tilly points out that the fact that I'm interpolating the values may be mis-interpreted as saying "don't use placeholders". You can continue to use placeholders rather than interpolating -- a better idea in general. You'd have to create ADO Command and Parameters objects, then Execute them. I haven't used ADO in Perl, and I don't even know if that's supported, so I'm not going to elaborate any further. In DBI-land it would be as easy as:

$sth = $dbh->prepare($sql) or warn(...); $sth->bind_columns(\($an, $ct, ...));