🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: Jak dodac fieldsy do Query ?

#70642
From: jh
Date: Tue, 21 Aug 2007 06:27
28 lines
2145 bytes
Użytkownik "Fantom" <szczukot@SPAM.poczta.onet.pl> napisał w wiadomości 
news:facrka$c18$1@atlantis.news.tpi.pl...
> Witam
> 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ć.

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

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!news-archive.icm.edu.pl!newsfeed.gazeta.pl!news.nask.pl!news.nask.org.pl!newsfeed.tpinternet.pl!nemesis.news.tpi.pl!atlantis.news.tpi.pl!news.tpi.pl!not-for-mail
From: "jh" <no-email@sorry.com>
Newsgroups: pl.comp.lang.delphi.bazy-danych
Subject: Re: Jak dodac fieldsy do Query ?
Date: Tue, 21 Aug 2007 08:27:40 +0200
Organization: tp.internet - http://www.tpi.pl/
Lines: 29
Message-ID: <fae0m9$ee9$1@atlantis.news.tpi.pl>
References: <facrka$c18$1@atlantis.news.tpi.pl>
NNTP-Posting-Host: m1-10.kielce.com.pl
Mime-Version: 1.0
X-Trace: atlantis.news.tpi.pl 1187677705 14793 195.116.213.10 (21 Aug 2007 06:28:25 GMT)
X-Complaints-To: usenet@tpi.pl
NNTP-Posting-Date: Tue, 21 Aug 2007 06:28:25 +0000 (UTC)
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.3138
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.3138
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit