Query pulls different results when in VB(ADO)/Access

Sharky Forums


Results 1 to 3 of 3

Thread: Query pulls different results when in VB(ADO)/Access

  1. #1
    Mako Shark Paladyr's Avatar
    Join Date
    Mar 2001
    Location
    Cinci, OH
    Posts
    4,562

    Post Query pulls different results when in VB(ADO)/Access

    I know there are differences between standard query language and Access SQL, but the query I wrote basically is just like:

    SELECT tbl1.field1, tbl2.field2, tbl3.field3 FROM tbl1, tbl2, tbl3
    WHERE tbl1.ID = tbl2.ID AND tbl1.ID = tbl3.ID

    In Access, it pulls the correct records, in the ADO code, it returns inaccurate/duplicate records. Do I just need to add tbl2.ID = tbl3.ID??? The query is a lot bigger then that but it is basically the same. I have also done it using INNER JOIN's and the same results occur; in Access it is correct, in ADO code, it is not. Thanks!

    ------------------
    My Rig

    Milhouse: "Remember when your dog ate my goldfish and you lied to me and said I never had a goldfish? Then why did I have the bowl Bart? Why did I have the bowl?"
    Core 2 Duo w Radeon 4850, Droid Phone, Mits HD1000U projector

  2. #2
    Reef Shark Nephalim's Avatar
    Join Date
    Nov 2000
    Location
    Michigan
    Posts
    463

    Post

    You probably need a JOIN or GROUP BY/SORT BY statement. One of these should do whatever it is that you want to do.

    ------------------
    ~ And that is my humble opinion.

    When I was a boy I was told that anybody could become President. Now I'm beginning to believe it. - Clarence Darrow

    The greatness of a woman’s power is measured in the size and amount of the balls she clutches in hand. -Me

    "Tink"
    1 GHz Tbird on A7V, 384MB PC133 RAM, Samsung 19" 900IFT, Radeon 64MB DDR VIVO, SB Live! MP3+, 42.9GB IBM HDD, Plexwriter 8/4/32, 3C905CTXM nic, Intellimouse Explorer
    ~ And that is my humble opinion.

    When I was a boy I was told that anybody could become President. Now I'm beginning to believe it. - Clarence Darrow

    The greatness of a woman’s power is measured in the size and amount of the balls she clutches in hand. -Nephalim

    "Tink"
    1700+ XP on A7N8X, 768MB PC2700 DDRRAM, Samsung 19" 900IFT, Radeon 64MB DDR VIVO, SB Live! MP3+, 42.9GB IBM HDD, Plexwriter 8/4/32, 3C905CTXM NIC

    "Hermes"
    Dell Inspiron 8200, 1.7 GHz P4, 512MB DDRRAM, 30GB HDD, DVDROM, Geforce4 Go 64MB

  3. #3
    Mako Shark Paladyr's Avatar
    Join Date
    Mar 2001
    Location
    Cinci, OH
    Posts
    4,562

    Question

    Did you read my post??? I'm not trying to accomplish anything... I'm looking for an explanation of why the same exact query pulls different results when used in an ADO recordset and inside Access. Not to be rude but it doesn't sound like you read what I was asking.

    ------------------
    My Rig

    Milhouse: "Remember when your dog ate my goldfish and you lied to me and said I never had a goldfish? Then why did I have the bowl Bart? Why did I have the bowl?"
    Core 2 Duo w Radeon 4850, Droid Phone, Mits HD1000U projector

Posting Permissions

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