SQL like query problem

I have the following SQL query:
SELECT tblDelegate.DelegateTitle, tblDelegate.DelegateName, tblDelegate.DelegateAffiliation FROM tblDelegate WHERE (((tblDelegate.DelegateName) Like '*e?'))

The problem is, that it doesn't generate any results even though the actual Access db query generates 19 results.

This is the form for it:

<% If ((Request.QueryString("delegate") = "lettere")) %>

    <form runat="server">
      <asp:DataList id="lettere" runat="server" width="80%">



Has anyone got any ideas?

This question follows on as the second part of the question on this page:
It is the second of two problem I have had with the database.

Thanks in advance.
Who is Participating?
laotzi2000Connect With a Mentor Commented:
Try change
Like '*e?'
Like '%e_'
DanBAtkinsonAuthor Commented:
Sorry, that's mySQL syntax and it doesn't work in an Access database which is what mine is.
DanBAtkinsonAuthor Commented:
Ok. Today is being a very weird day...

So... The query syntax '*e?' works in Access but '%e_' doesn't work because Access does not recognise % and _ as correct syntax.

I have actually tried that method further down the page:

...in access as a query but it didn't recognise % or _. Never mind, it works. Only that I didn't think it would!!!

Points awarded to laotzi2000 and I deserve a slap around the head for thinking that Access knew best! :p
in fact that's ado wildcard: % and _
if you run the query in access, you should use * and ?
but with ado, you should use % and _
DanBAtkinsonAuthor Commented:
Ok. Thanks! Yes. ADO! I meant ADO really! ;) I've just spent an hour in a seminar about it!
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.