Have you installed DBD::ADO? The DBI driver needs an appropriate DBD interface for your database.
Also, if you move your prepare statement before the loop, it may make things go a bit quicker:
open my $FILEHANDLE,$FilePath or die "Failure opening CSV file for rea +ding: " . $!; my $InsertUserQuery = "INSERT INTO Users (Username,FullName,FirstName, +LastName) VALUES (?,?,?,?);"; my $InsertUserResult = $DBHandle->prepare($InsertUserQuery); while (<$FILEHANDLE>) { chomp; next if /Last Name/; my ($LastName,$FirstName,$GUID) = split (/\t/,$_); $LastName =~ s/"//g; $FirstName =~ s/"//g; $GUID =~ s/"//g; my $FullName = $FirstName . " " . $LastName; &Echo("Inserting $FullName"); $InsertUserResult->execute($GUID,$FullName,$FirstName,$LastName); } close $FILEHANDLE;
...roboticus
You bubble-headed booby! --Dr. Smith
(Sorry for the cheap joke.)
In reply to Re: How can I connect my perl script to an Access 2010 (.accdb) file?
by roboticus
in thread How can I connect my perl script to an Access 2010 (.accdb) file?
by will_danger
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |