🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.cppbuilder.database.ado
Article #4872

Re: Incorrect SQL behavior

#4872
From: Hardee Mahoney
Date: Mon, 24 Sep 2001 12:10
39 lines
2115 bytes
If I copy the SQL statement outside of the property editor and execute it
interactively against the SQL Server, the query works fine.  Can someone else
try a SELECT DISTINCT query and tell me it works fine for them?

Arnie Mauer wrote:

> Hardee,
>
> Don't really know what your problem is, but it's not ADO.  It's up
> to SQL Server to process the request.
>
> - Arnie
>
> "Hardee Mahoney" <mahoney@nerdvana.fu.com> wrote in message
> news:3BA89961.92374FCA@nerdvana.fu.com...
> > Hello,
> >
> > BCB5 SP1 on NT
> >
> > I have an ADOConnection to a SQL Server 6.5 database using a Data Link
> > File.  I have an ADOQuery associated with that connection with the
> > following SQL:
> >
> > SELECT DISTINCT simple_plantype
> > FROM medigap_plantype_xwalk
> > ORDER BY simple_plantype
> >
> > I have a DataSource object and a DBGrid.
> >
> > The SQL statement returns all rows in the table, completely disregarding
> > the DISTINCT keyword.  Has anyone seen this?  Is there anything to fix
> > it short of reading all the rows and deduping them in code?
> >
> > Thanks in advance
> >
> > Hardee Mahoney
> > Washington, DC
> >
> >
Technical Details
Message-ID: <3BAF22CF.63E79672@nerdvana.fu.com>
Path: arc1-ca.pugleaf.net!archiver1.google.com!newsfeed.google.com!sn-xit-02!supernews.com!newsfeed.direct.ca!look.ca!newshub2.rdc1.sfba.home.com!news.home.com!newsfeed.mesh.ad.jp!uunet!osa.uu.net!newsfeeds.ihug.co.nz!ihug.co.nz!dnews
References: <3BA89961.92374FCA@nerdvana.fu.com> <3baa0b6b_1@dnews>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 10698b,79563bdbb3a120de
X-Google-Attributes: gid10698b,public
X-Google-ArrivalTime: 2001-09-24 05:24:22 PST
Message-ID: <3BAF22CF.63E79672@nerdvana.fu.com>
Date: Mon, 24 Sep 2001 08:10:55 -0400
From: Hardee Mahoney <mahoney@nerdvana.fu.com>
X-Mailer: Mozilla 4.77 [en] (WinNT; U)
X-Accept-Language: en
MIME-Version: 1.0
Newsgroups: borland.public.cppbuilder.database.ado
Subject: Re: Incorrect SQL behavior
References: <3BA89961.92374FCA@nerdvana.fu.com> <3baa0b6b_1@dnews>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
NNTP-Posting-Host: 63.83.108.2
X-Trace: dnews 1001333669 63.83.108.2 (24 Sep 2001 05:14:29 -0700)
Lines: 40
Path: arc1-ca.pugleaf.net!archiver1.google.com!newsfeed.google.com!sn-xit-02!supernews.com!newsfeed.direct.ca!look.ca!newshub2.rdc1.sfba.home.com!news.home.com!newsfeed.mesh.ad.jp!uunet!osa.uu.net!newsfeeds.ihug.co.nz!ihug.co.nz!dnews