in reply to Missing a bind variable, but where?

One of your form fields is undefined. CGI's param function returns an empty list when it doesn't have a param by that name, if it's called in list context as it is here. It's like writing @a = (1,2,(),(),3); -- it creates an array with 3 elements. Very frustrating when writing CGI/DBI code, isn't it? ;)

You'll need to do something like this to get those param calls out of list context.:

$db_sth->execute( $q->param( 'dbms_name' ) || '', ## or || undef $q->param( 'report_name' ) || '', $q->param( 'report_desc' ) || '', ...

blokhead

Replies are listed 'Best First'.
Re: Re: Missing a bind variable, but where?
by DamnDirtyApe (Curate) on Feb 27, 2003 at 17:44 UTC

    Yup, you had it right. I'd forgotten to put a name attribute on one of the form elements. Everything's working perfectly now, thanks to all for your suggestions!


    _______________
    DamnDirtyApe
    Those who know that they are profound strive for clarity. Those who
    would like to seem profound to the crowd strive for obscurity.
                --Friedrich Nietzsche