BorlandTalk.com Forum Index BorlandTalk.com
Borland discussion newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Connecting DBGrid to query

 
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi Databases (SQL Servers)
View previous topic :: View next topic  
Author Message
Guest






PostPosted: Thu Apr 12, 2007 4:33 pm    Post subject: Connecting DBGrid to query Reply with quote



Hi,

I succed to connect DBGrid to DataSource but I could't find the way of
connecting DBGrid to any ADOQuery. I don't want to see the complete
table, I want to see the required part of the table. Is there any way
to do this ?

Mücahit
Back to top
yannis
Guest





PostPosted: Thu Apr 12, 2007 5:17 pm    Post subject: Re: Connecting DBGrid to query Reply with quote



mcelikag (AT) ebim (DOT) net explained :
Quote:
Hi,

I succed to connect DBGrid to DataSource but I could't find the way of
connecting DBGrid to any ADOQuery. I don't want to see the complete
table, I want to see the required part of the table. Is there any way
to do this ?

Mücahit

connect Datasource to the required ADOQuery or use ADODataset

regards
YAnnis.
Back to top
Bill Todd
Guest





PostPosted: Thu Apr 12, 2007 8:24 pm    Post subject: Re: Connecting DBGrid to query Reply with quote



Set the DataSource.DataSet property to the ADOQuery.

Set the DBGrid.DataSource properety to the DataSource.

--
Bill Todd (TeamB)
Back to top
Guest






PostPosted: Fri Apr 13, 2007 8:11 am    Post subject: Re: Connecting DBGrid to query Reply with quote

On 12 Nisan, 15:17, yannis <n...@noware.non> wrote:
Quote:
mceli...@ebim.net explained :

Hi,

I succed to connect DBGrid to DataSource but I could't find the way of
connecting DBGrid to any ADOQuery. I don't want to see the complete
table, I want to see the required part of the table. Is there any way
to do this ?

Mücahit

connect Datasource to the required ADOQuery or use ADODataset



I tried to connect Datasource to the required ADOQuery before, but I
didn't success, now its ok.

Many thanks for your helps.

Mucahit
Back to top
Alain Quesnel
Guest





PostPosted: Sun Apr 15, 2007 8:11 am    Post subject: Re: Connecting DBGrid to query Reply with quote

Once you have connected your DataSource to ADOQuery like Bill and have
mentioned,. use the SQL property to determine what "part" of your table you
want to display.
Ex.:
select * from mytable
where COUNTRY = 'XYZ'
will only display records for country XYZ

--

Alain Quesnel
alainsansspam (AT) logiquel (DOT) com

www.logiquel.com


<mcelikag (AT) ebim (DOT) net> wrote in message
news:1176377604.530950.146810 (AT) q75g2000hsh (DOT) googlegroups.com...
Hi,

I succed to connect DBGrid to DataSource but I could't find the way of
connecting DBGrid to any ADOQuery. I don't want to see the complete
table, I want to see the required part of the table. Is there any way
to do this ?

Mücahit
Back to top
Display posts from previous:   
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi Databases (SQL Servers) All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.