$entrysql->bind('',[sub { $sql = $entrysql->get; my $sth; eval {$sth = $dbh->prepare("select $mainstr from info $sql") or warn DBI::errstr $!; $sth->finish; }; if ($@){ print "ERROR - $@\n"; print chr(07); return; } .......continue to execute the sql } #### DBD::SQLite::st execute failed: near "=": syntax error at ./ztkdb12a line 664. Tk::Error: dbih_setup_fbav: invalid number of fields: 0, NUM_OF_FIELDS attribute probably not set right at ./ztkdb12a line 668. (command bound to event)