in reply to Re^3: Locking Access Records and Database
in thread Locking Access Records and Database

I altered the Perl as shown below to get the value of $dbh->errstr.
I then printed this out with the text I used in the $dbh->do statement.
The change code is next.
print "\n[lock_table] entry\n\n"; $lock_res = 'unset'; $lock_str = "LOCK TABLES " . $table . " WRITE"; $lock_res = $dbh->do($lock_str); $dberr = $dbh->errstr; print "[lock_table] locking table <$table> with <$lock_str>\nresul +t <$lock_res>\nerror message <$dberr>\n";
The output is next
[lock_table] entry [lock_table] locking table <Stock> with <LOCK TABLES Stock WRITE> result <> error message <>
As you can see the error string did not contain anything.
Any ideas about what to do next?

Replies are listed 'Best First'.
Re^5: Locking Access Records and Database
by ikegami (Patriarch) on Apr 09, 2008 at 10:32 UTC

    Well, that's not good. do should return -1 on success in this scenario, and errstr should be set if there's an error. It would seem to indicate a buggy DBD. In any case, this is far out of my realm of experience.

      OK - thanks for your help