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

So what's the error message ($dbh->errstr)?

Replies are listed 'Best First'.
Re^4: Locking Access Records and Database
by merrymonk (Hermit) on Apr 09, 2008 at 10:20 UTC
    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?

      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