use DBI qw(SQL_VARCHAR); $sth->bind_param(1, $mrn, SQL_VARCHAR); $sth->execute(); #### If any arguments are given, then "execute" will effectively call "bind_param" for each value before executing the statement. Values bound in this way are usually treated as "SQL_VARCHAR" types unless the driver can determine the correct type (which is rare), or unless "bind_param" (or "bind_param_inout") has already been used to specify the type.