in reply to variable substitution using Like in DBI

Instead of using '*' (like Access says you should), try the '%'. My tests don't work when using '*', but do when using the '%'. My guess is that DBI is converting it during the prepare step.

Other than that, my code looks just like jasonk and menolly's.

If it makes any difference, I'm using Access 97 via DBD::ODBC.

Good luck.

  • Comment on Re: variable substitution using Like in DBI

Replies are listed 'Best First'.
Re: Re: variable substitution using Like in DBI
by runrig (Abbot) on Sep 12, 2003 at 03:11 UTC
    My guess is that DBI is converting it during the prepare step.

    It's probably the ODBC driver doing the conversion. DBI shouldn't be converting anything, as it and DBD::ODBC wouldn't know anything about what needs to be converted specifically for Access.

      Awesome .. thanks that fixed it. Shoulda thought of that though.. thanks guys for all your help.