Results 1 to 3 of 3
  1. #1
    Join Date
    Jan 2006
    Location
    Washington, D.C
    Posts
    29

    Unanswered: SQL statement won't retrieve records.

    Ok what am i doing wrong here:

    Code:
    Set MyConn = New ADODB.Connection
       
    connstr = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source = M:\Privacy CQI\Testing\FTE Folder\FTE 1.0 - Beta.mdb"
    MyConn.CursorLocation = adUseClient
    MyConn.open connstr, "Admin"
    
    FinalQuery = "SELECT Employee.First, Employee.MI, Employee.Last, Employee.RegionID, Employee.FK  FROM Employee WHERE (((Employee.First) LIKE "*ab*") ) ORDER BY Employee.First;"
    
    
    Set rst = MyConn.Execute(FinalQuery)

    this keeps returning no records.

  2. #2
    Join Date
    May 2005
    Location
    Nevada, USA
    Posts
    2,888
    Provided Answers: 6
    Try changing the wildcard character to "%".
    Paul

  3. #3
    Join Date
    Jan 2006
    Location
    Washington, D.C
    Posts
    29
    NEVERMIND!!!!!

    i used
    "*ab*"

    instead of
    "%ab%"

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •