Ill be honest, most of the DBI instructions were added on for debugging purposes, and I'm not sure I know what some of them do, particularly AutoCommit.
I'm using this on a Win2000 Box with MS Access, how do I check the server log? Dont tell me, its not possible with Access... :-(
Further, how do I do a hard commit? And should I be doing this after each INSERT or just occasionaly?
Unfortunately I can give you no help with Access, and I don't know if Access support commit and rollback ... sorry, Don't you have any other DB to test you script with?. Anyway, For the other questions:
AutoCommit is a database handler attribute: from the DBI man page: "If true, then database changes cannot be rolled-back (undone). If false, then database changes automatically occur within a "transaction", which must either be committed or rolled back using the commit or rollback methods.": you can read further details in DBI man page. You can set AutoCommit in the connect statement in the same way as you set RaiseError, for example:
my $dbh = DBI->connect(
"DBI:ODBC:$databaseName",
{
AutoCommit => 0,
RaiseError => 1
}
)
or die "cannot connect to Oracle!";
This makes sense only when you turn AutoCommit off.
You can do a commit after every INSERT to see if it works, but this may be time consuming, so you may decide to commit every 10 or 50 INSERT, or whatever is suitable for your application.
forget MS Access and get a real DB. installation is a breeze, usage is quite friendly with a frontend.
I tried writing NT services using Access/ODBC (even ADO) but they all dies or locks (without further notice) after 1-2 days. with MySql and DBI I have months of uptime and not a problem.
cheers,
Aldo
__END__
$_=q,just perl,,s, , another ,,s,$, hacker,,print;