in reply to DBI Problem - binding variables

hmm... looks like you're binding the variable twice. once explicitly, and another implicitly. ( calls to $sth->execute() are implicity calls to bind_params ).

i'd suggest binding all three input params as a matter of style. ( either do 'em all, or don't do it. . . )

and if the 'upload' seems to be failing, an extra defensive check for the values of  ( $mimeType, $contentImage ) wouldn't hurt.

UPDATE: there might also be a limit on the DB side. try to insert a 13K JPEG directly ( but use rollback ). or check the schema and see if you can locate the maxsize ( that's on Oracle, i dunno M$ apps ).

Replies are listed 'Best First'.
(Ovid - Pointy-haired bosses who don't talk to programmers)
by Ovid (Cardinal) on Oct 04, 2000 at 03:29 UTC
    Problem solved.

    The IS director took off on vacation. He's also the person who maintains the database. Seems he felt that the MIME type didn't need to have more than 10 characters.

    MIME type for progressive jpegs: image/pjpeg

    This was varchar initially but apparently got changed without telling me.

    I love it when "specifications" turn into a skeet shoot.

    I also love it when I focus on what I know (the binding) is the problem that I miss the obvious. Hmm... maybe that's why I keep voting for dud politicians.

    Cheers,
    A very red-face Ovid

RE: RE: DBI Problem - binding variables
by runrig (Abbot) on Oct 04, 2000 at 06:08 UTC
    binding more than once is ok, if you set the bind_type during the bind_param(), then it remembers the type when you do the execute. At least according to the DBI docs.