Just to add I can get the result I want by doing
"SELECT * FROM AC.Patient WHERE PNAME LIKE '%" + txtName.Text + "%'"
However its not very consistent if I have to change depending on the query.
Would be nice to use parameters all the time if possible

Thanks

Tony



"Tony Yates" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> That worked a treat thank you very much
>
> How do I encapsulate this in a  like statement ?
>
> "SELECT * FROM AC.Patient WHERE PNAME LIKE %?%"
>
> This doesn't work with spaces or single quotes ?
>
> Many Thanks
>
> Tony
>
>



Reply via email to