Notices

Great community. Great ideas.

Welcome to ASP/Free, a community dedicated to helping beginners and professionals alike in improving their knowledge of Microsoft's development and administration technologies. Sign up today to gain access to the combined insight of tens of thousands of members.

Thread: No records returned from access db

Results 1 to 4 of 4
Share This Thread →
  1. #1
    Avalonsky is offline Registered User
    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
    Avalonsky is offline Registered User
    Join Date
    Feb 2013
    Posts
    3
    Rep Power
    0
    Should I use IS NULL and IS NOT NULL instead ?

  3. #3
    gk53's Avatar
    gk53 is offline Contributing User
    Join Date
    Mar 2005
    Location
    Columbus, OH
    Posts
    1,538
    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

  4. #4
    Avalonsky is offline Registered User
    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.

Share This Thread →

Become Part of This Conversation

Join NowFor Free!

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

ASP Free Advertisers and Affiliates