#1
  1. No Profile Picture
    Registered User
    ASP Explorer (0 - 99 posts)

    Join Date
    Feb 2013
    Posts
    3
    Rep Power
    0

    No records returned from access db


    Hello
    I have a strange problem doing a simple search in my access database using Jet connection string. It is classic ASP.
    if condition ="lager" then
    SQL = "SELECT * FROM mydatabase where outdate = '' order by productno;"
    elseif condition = "ejlager" then
    SQL = "SELECT * FROM mydatabase where outdate <> '' order by productno;"
    else
    SQL="SELECT * FROM mydatabase order by productno;"
    end if
    outdate is just a plain textfield.
    In the first two conditions I got no records returned. When I select something else that takes me to last if then it returns all records.
    It works fine when testing on my SQL db, but not in access db. Can it have something to do with UTF-8 that I have coded the page to ?
    Does anyone have a solution to this then I would be very greatful and maybe litte wiser :-) .

    /Peter
  2. #2
  3. No Profile Picture
    Registered User
    ASP Explorer (0 - 99 posts)

    Join Date
    Feb 2013
    Posts
    3
    Rep Power
    0
    Should I use IS NULL and IS NOT NULL instead ?
  4. #3
  5. Contributing User
    ASP Skiller (1500 - 1999 posts)

    Join Date
    Mar 2005
    Location
    Columbus, OH
    Posts
    1,587
    Rep Power
    278
    how you define outdate field? Date/Time? if yes you should check for null
    GK
    __________________________________________________ _____
    if you found this post is useful click Give Rep button (bottom side on this reply ) and agree
  6. #4
  7. No Profile Picture
    Registered User
    ASP Explorer (0 - 99 posts)

    Join Date
    Feb 2013
    Posts
    3
    Rep Power
    0
    It is just a plain textfield. I can not try this before tomorrow, but I suppose it would work testing with NULL instead.

Similar Threads

  1. Too many records returned?
    By jonpanky in forum SQL Development
    Replies: 2
    Last Post: November 4th, 2009, 02:16 AM
  2. Null records not being returned
    By AndyTodd in forum Microsoft Access Help
    Replies: 1
    Last Post: December 6th, 2004, 05:37 AM
  3. Display Message if there are no records returned
    By twopecker in forum ASP Development
    Replies: 5
    Last Post: October 30th, 2004, 12:33 PM
  4. counting #of records returned in a query
    By Icepickle in forum Microsoft Access Help
    Replies: 3
    Last Post: August 22nd, 2004, 03:32 AM
  5. Limit Records Returned
    By odonovanpm in forum SQL Development
    Replies: 2
    Last Post: November 19th, 2003, 11:47 AM

IMN logo majestic logo threadwatch logo seochat tools logo