Reidy, Ron [mailto:[EMAIL PROTECTED] wrote: > > Your statement only has one bind variable (?). The other "bind > variable" is actually a Perl variable. Your execute will fail because > of this. > > However, there is another issue. You cannot substitute bind variables > in this manner. Your attempt to dynamically build column names will > fail. You will need to use 'EXECUTE IMMEDIATE' to perform this type of > action.
I think you're misinterpreting his code. He's just building up an SQL statement in steps. After all the assignments, the value of $sql that's passed to $dbh->prepare() is: UPDATE clientcomp SET ccompStreet = ? WHERE ccompid = ? which is perfectly valid. The only problem I see is that he's passing the wrong value for the first bind parameter. Ronald