Results 1 to 3 of 3
  1. #1
    Join Date
    Oct 2003
    Posts
    3

    Unanswered: SQL Query Problem

    Hi,

    I am trying to run a query which when run from ADO does not give me a result. However, when run from MS Access'97, it gives me perfect result. I am reproducing the query below.

    SELECT 'x' AS Expr1 FROM [AdminArea] WHERE ((([AdminArea].[AdminID])=58000001) AND (([AdminArea].[AdminCode])='FIN') AND (([AdminArea].[AdminCodeRW])='FIN') AND (([AdminArea].[Order])=0) AND (([AdminArea].[StandardName])='Suomi') AND (([AdminArea].[StandardLangCode])=9) AND (([AdminArea].[#Inhab])=5194901) AND (([AdminArea].[Km2])=338144.531250) AND (([AdminArea].[Capital])=58000071) AND (([AdminArea].[HigherAdminID]) Is Null) AND (([AdminArea].[Validation])=0) AND (([AdminArea].[Touristic])=False) AND (([AdminArea].[DilutedMRNW])=False) AND (([AdminArea].[SpeedUnitID])=1) AND (([AdminArea].[ComplexAreaFlag])=0) AND (([AdminArea].[RelCount])=0));

    Can you spot anything funny here.


    Thanks in anticipation.

    Regards,
    sirgaurav

  2. #2
    Join Date
    Jul 2003
    Location
    Michigan
    Posts
    1,941
    Try replacing all of your "=False" with "<>-1"
    Inspiration Through Fermentation

  3. #3
    Join Date
    Jul 2003
    Location
    Amsterdam, Nederland
    Posts
    450

    Exclamation Try this

    Wher you have ='text'

    better to set there like 'text'

    So
    ([AdminArea].[AdminCode]) LIKE 'FIN') AND (([AdminArea].[AdminCodeRW]) LIKE 'FIN')

    instead off
    ([AdminArea].[AdminCode])='FIN') AND (([AdminArea].[AdminCodeRW])='FIN')

Posting Permissions

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