SQL like query problem

Posted on 2005-05-08
Last Modified: 2010-04-07
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.
Question by:DanBAtkinson
    LVL 12

    Accepted Solution

    Try change
    Like '*e?'
    Like '%e_'

    Author Comment

    Sorry, that's mySQL syntax and it doesn't work in an Access database which is what mine is.

    Author Comment

    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: 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
    LVL 12

    Expert Comment

    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 _

    Author Comment

    Ok. Thanks! Yes. ADO! I meant ADO really! ;) I've just spent an hour in a seminar about it!

    Featured Post

    Enabling OSINT in Activity Based Intelligence

    Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

    Join & Write a Comment

    Sometimes in DotNetNuke module development you want to swap controls within the same module definition.  In doing this DNN (somewhat annoyingly) swaps the Skin and Container definitions to the default admin selections.  To get around this you need t…
    I recently went through the process of creating a Calendar Control of events with the basis of using a database to keep track of the dates that are selectable, one requirement was to have the selected date pop-up in a simple lightbox.  At first this…
    Internet Business Fax to Email Made Easy - With eFax Corporate (, you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…
    In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…

    754 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    16 Experts available now in Live!

    Get 1:1 Help Now