#1
  1. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jul 2000
    Posts
    2
    Rep Power
    0
    Hi, I'm trying to execute the following SQL statement and get the following error.

    --QUERY--
    SELECT DomainNames.DomainName FROM DomainNames WHERE DomainNames.DomainName Like "*ab*" ORDER BY DomainNames.DomainName

    --ERROR--
    SQL error: [Microsoft][ODBC Microsoft Access Driver] Too few parameters. Expected 1., SQL state 07001 in SQLExecDirect

    Any help would be greatly appreciated.
    I'm running PHP4, Apache 1.3.12 (Win32) and connecting to an Access database on a Win2K box.
  2. #2
  3. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jul 2000
    Posts
    2
    Rep Power
    0
    Hmm Found the problem.

    You have to use: where X like '%blah%'
    instead of: where X like "*blah*"

    the second one is what microsoft actually tell you to use in the access docs, and it does work if you run it directly in access. it doesn't work, however, when you try and run the same query using ODBC. *rolls eyes*

Similar Threads

  1. windows XP chkdsk and file system problems
    By wey97 in forum Windows Help
    Replies: 26
    Last Post: August 2nd, 2005, 11:37 PM
  2. Popup problems from Flash in IE6
    By jmichels in forum Flash Help
    Replies: 19
    Last Post: January 6th, 2004, 03:27 PM
  3. DNS problems
    By banneaux in forum DNS
    Replies: 7
    Last Post: October 10th, 2003, 05:58 AM
  4. Replies: 0
    Last Post: August 26th, 2003, 07:50 PM
  5. Windows problems
    By Known_criminal in forum Windows Help
    Replies: 0
    Last Post: August 23rd, 2003, 07:23 PM

IMN logo majestic logo threadwatch logo seochat tools logo