in reply to eval doesn't work under tkx

Are you sure the error is within the eval { ... } block? What does your program do when you click that button? Does it die? With what error message? Maybe the preparation or execution of $drop fails in that case.

Replies are listed 'Best First'.
Re^2: eval doesn't work under tkx
by nyj (Novice) on Jul 15, 2010 at 22:14 UTC
    Yes, I'm sure - if I put 'print' statements around the lines of code, it's certain that it fails on 'execute()' and comes up with 'Table ... already exists. (SQL-42501)' If I execute the program from the command line, the 'eval' loop works properly, catches the 'already exists' error and executes the 'drop table' statement, before re-entering the loop and succeeding on the sql statement in question, which is
    select ... into <table>
    But if I run it from the Tkx window, it just dies on the sql-42501 error.