On Mon, 30 Dec 2002 00:12:40 -0500, Jeff Thies wrote:

>> I'm getting a weird error when I try to update a text field (Access,
>> latest ODBC and DBI) sometimes:
>
>This is a placeholder problem. Changing the script so the affected field
>is not a placeholder eliminates the problem. ie: set text_field=? fails
>*sometimes* while set text_field='$text_field' does not. Where might the
>problem be?

In that case, it sounds like an incorrect guess of the type of variable.
Try something like

        use DBI ':sql_types';   # to import the constants
        ...
        $sth = $dbh->prepare($sql);
        $sth->bind_param(1, undef, SQL_VARCHAR);
        $sth->execute($value);

i.e. inserting an appropriate bind_param call between the prepare and
the execute.

where you may try one of several constants instead of the SQL_VARCHAR.
See the section on "DBI Constants" in the DBI docs.

-- 
        Bart.

Reply via email to