Article View: be.comp.programming
Article #4071Re: Dataset question
From: KLinZ
Date: Wed, 17 Sep 2003 16:08
Date: Wed, 17 Sep 2003 16:08
19 lines
1861 bytes
1861 bytes
In news:3f685515$0$259$4d4efb8e@news.be.uu.net, Kris Hoobergs typed:
> I think I've a simple question.
> Is it possible to retrieve the used sql command (eg select * from
> customers) that is used for filling a dataset, if you have only the
> dataset available?
If your dataset is a TQuery you can do this:
function SQLFromDataSet(DataSet: TDataSet): string;
begin
if DataSet is TQuery then
Result := TQuery(DataSet).SQL
else
Result := '';
end;
--
www.zenobits.com
Technical Details
Message-ID:
<xG%9b.4625$P51.7549@amstwist00>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-06!sn-xit-05!sn-xit-01!sn-xit-09!supernews.com!68.6.19.232.MISMATCH!west.cox.net!east.cox.net!peer01.cox.net!cox.net!newshosting.com!news-xfer1.atl.newshosting.com!newsfeed.icl.net!newsfeed.fjserv.net!diablo.theplanet.net!mephistopheles.news.clara.net!news.clara.net!skynet.be!skynet.be!newsgate.cistron.nl!amsnews01.chello.com!amstwist00.POSTED!not-for-mailReferences:
<3f685515$0$259$4d4efb8e@news.be.uu.net>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: fcea4,bd13918bad7b346a X-Google-Attributes: gidfcea4,public X-Google-ArrivalTime: 2003-09-17 09:09:39 PST Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-06!sn-xit-05!sn-xit-01!sn-xit-09!supernews.com!68.6.19.232.MISMATCH!west.cox.net!east.cox.net!peer01.cox.net!cox.net!newshosting.com!news-xfer1.atl.newshosting.com!newsfeed.icl.net!newsfeed.fjserv.net!diablo.theplanet.net!mephistopheles.news.clara.net!news.clara.net!skynet.be!skynet.be!newsgate.cistron.nl!amsnews01.chello.com!amstwist00.POSTED!not-for-mail From: "KLinZ" <klinz@NOSPAMzenobitsSPAMNO.com.invalid> Newsgroups: be.comp.programming References: <3f685515$0$259$4d4efb8e@news.be.uu.net> Subject: Re: Dataset question Lines: 19 Organization: Inc. MIME-Version: 1.0 Content-Type: text/plain; charset="Windows-1252" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2800.1158 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165 Message-ID: <xG%9b.4625$P51.7549@amstwist00> Date: Wed, 17 Sep 2003 18:08:32 +0200 NNTP-Posting-Host: 212.187.71.152 X-Complaints-To: abuse@chello.nl X-Trace: amstwist00 1063814941 212.187.71.152 (Wed, 17 Sep 2003 18:09:01 MET DST) NNTP-Posting-Date: Wed, 17 Sep 2003 18:09:01 MET DST