🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: pl.comp.lang.delphi.bazy-danych
Article #70643

Re: Jak dodac fieldsy do Query ?

#70643
From: Fantom
Date: Tue, 21 Aug 2007 17:00
36 lines
2313 bytes
> > Jak z poziomu programu wywoalc jakas funkcje ktora doda do TQuery
> > wszytskie
> > fieldsy. Czyli tak jak z poziomu design mozna kliknac na TQuery i wybrac
> > Add
> > All Fields
> > Zapytanie mam tworzone dynamicznie, a fieldsy sa mi potrzebne.
>
> Z helpa: TDataSet.DefaultFields
>
> Read DefaultFields to determine whether a dataset uses dynamically
generated
> field components or persistent field components. If DefaultFields is true,
> the dataset uses dynamically allocated field components. If DefaultFields
is
> false, the dataset uses persistent field components.
>
> Unless persistent field components are assigned to a dataset at design
time
> using the Fields editor, the dataset creates dynamic field components
based
> on the structure of its underlying data when it is opened.
>
> I przecież masz dostęp do nich przez TDataSet.Fields... Nie ma potrzeby
ich
> tworzyć, chyba,  że potrzebujesz pola, które nie występują w zapytaniu.
Masz
> metodę TFields.Add(Field: TField). W helpie jest info jakie typy pól
możesz
> dodać.

No wlasnie chcialbym metode TFields.AddAllFields() i tyle. Fielda potarfie
zrobic i dodac go do dataseta. Ael to jednak kupa roboty kazdego fielda z
osoban dodoawac, o innym typie itp. W kilku miejschach tak robie ale szukam
czegos co zrobi to za mnie

Fantom
Technical Details
Message-ID: <faf5po$olh$1@atlantis.news.tpi.pl>
Path: mbox-mo1.pugleaf.net!news-archive.icm.edu.pl!newsfeed.gazeta.pl!newsfeed.tpinternet.pl!atlantis.news.tpi.pl!news.tpi.pl!not-for-mail
References: <facrka$c18$1@atlantis.news.tpi.pl> <fae0m9$ee9$1@atlantis.news.tpi.pl>

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!news-archive.icm.edu.pl!newsfeed.gazeta.pl!newsfeed.tpinternet.pl!atlantis.news.tpi.pl!news.tpi.pl!not-for-mail
From: "Fantom" <szczukot@SPAM.poczta.onet.pl>
Newsgroups: pl.comp.lang.delphi.bazy-danych
Subject: Re: Jak dodac fieldsy do Query ?
Date: Tue, 21 Aug 2007 19:00:48 +0200
Organization: tp.internet - http://www.tpi.pl/
Lines: 37
Message-ID: <faf5po$olh$1@atlantis.news.tpi.pl>
References: <facrka$c18$1@atlantis.news.tpi.pl> <fae0m9$ee9$1@atlantis.news.tpi.pl>
NNTP-Posting-Host: awn66.internetdsl.tpnet.pl
Mime-Version: 1.0
X-Trace: atlantis.news.tpi.pl 1187715704 25265 83.18.65.66 (21 Aug 2007 17:01:44 GMT)
X-Complaints-To: usenet@tpi.pl
NNTP-Posting-Date: Tue, 21 Aug 2007 17:01:44 +0000 (UTC)
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1807
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1896
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit