[quoted text, click to view] "Wendy Parry" <wendy.parry@lotusblossom.org.uk> wrote in message
news:dsn8cn$dlu$1@nwrdmz01.dmz.ncs.ea.ibs-infra.bt.com...
> Hi,
> I'm having a little trouble using the SQL LIKE clause with asp.net to an
> Access Database...
>
> Dim strSQL as String = "SELECT * FROM tblDickerExtensions WHERE Surname "
> & " LIKE " & criteria & "*"
>
> I just can't get the " & ' syntax correct, I'm sure it's a 2 second thing
> for you guys...
>
> thanks in advance for help
Try changing it to
Dim strSQL as string = "SELECT * FROM tblDickerExtensions WHERE Surname LIKE
'%" & criteria & "%'"
Note the single quote ' before and after the %
Don't know if this will work in asp.net but it works with classic asp
Roger