On Fri, Nov 29, 2002 at 12:33:42PM +0100, Bart Lateur wrote: > I hadn't looked at this thread until now, but now that I do, I do > recognize the pattern. I've had the same kind of problems with Access. > What can fix this, is having an explicit bind on the variable type, > after the pepare phase, but before the first time you execute this > statement. It certainly did help in Access. My code (adapted) looked > like this: > use DBI ':sql_types'; # to import the constants > $sth->bind_param(2, undef, SQL_VARCHAR); > $sth->bind_param(1, undef, SQL_INTEGER);
Yeah ... unfortunately I have to think of some way to deal with this for Class::DBI users ... and forcing them to specify this like this isn't really ideal.... I think my main surprise is that this hasn't bitten people more often. There are probably quite a lot of applications out there that will break if the first user ever inserts an all-numeric value for what's normally a text field. Tony
