🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: DBGrid ?

#3751
From: Vassiliev V.V.
Date: Wed, 03 Jul 2002 07:30
59 lines
2675 bytes
You should have one dataset and one DBGrid. In dataset use query like

SELECT [Department Name], FirstName & Chr(32) & LastName AS Name FROM
Departments LEFT JOIN Employees ON Departments.[Department ID] =
Employees.[Department ID] ORDER BY [Department Name]

This sample is for Jet (MS Access) database. Look for help on JOIN in
documentation for your database. Look also help for LEFT JOIN, RIGHT JOIN,
INNER JOIN.

Then you will have columns from both tables.

Regards,
Vassiliev V.V.
http://www.oledbdirect.com

"Uros Obradovic" <ouros@hotmail.com> �������/�������� � �������� ���������:
news:3d21ee9d_2@dnews...
> So what should I do ? I really need this control. Should I try to create a
> new one or is there something else I could use ?
>
> Thanks
> Uros
>
>
> "Vassiliev V.V." <news@vassilievvv.mtu-net.ru> wrote in message
> news:3d21666a_2@dnews...
> > That is not possible. You SQL join query to have one dataset containing
> all
> > columns you need.
> >
> > Regards,
> > Vassiliev V.V.
> > http://www.oledbdirect.com
> >
> >
> > "Uros Obradovic" <ouros@hotmail.com> �������/�������� � ��������
> ���������:
> > news:3d21274c$1_1@dnews...
> > > Is there a way to have 1 (one) DBGrid control on my form but to be
> > connected
> > > with 2 (two) DataSets.
> > > Lets say I have 2 tables, Contacts and Company and they both have the
> same
> > > field ID. Can I have in my DBGrid these two tables connected inside
this
> > > control or thats impossible.
> > > If is possible, would you please give me an example or give me an URL
of
> > > same.
> > >
> > > Thank you
> > > Uros
> > >
> > >
> >
> >
>
>
Technical Details
Message-ID: <3d22ae9a_1@dnews>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-08!supernews.com!iad-peer.news.verio.net!news.verio.net!newsfeed.wirehub.nl!PeerFeed.KWeb.on.ca!dnews
References: <3d21274c$1_1@dnews> <3d21666a_2@dnews> <3d21ee9d_2@dnews>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII
X-Google-Thread: 10698b,e9ff7b93afddb432
X-Google-Attributes: gid10698b,public
X-Google-ArrivalTime: 2002-07-03 01:03:25 PST
From: "Vassiliev V.V." <news@vassilievvv.mtu-net.ru>
Newsgroups: borland.public.cppbuilder.database.ado
References: <3d21274c$1_1@dnews> <3d21666a_2@dnews> <3d21ee9d_2@dnews>
Subject: Re: DBGrid ?
Date: Wed, 3 Jul 2002 11:30:41 +0400
Lines: 61
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2600.0000
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000
NNTP-Posting-Host: 62.118.134.114
Message-ID: <3d22ae9a_1@dnews>
X-Trace: dnews 1025683098 62.118.134.114 (3 Jul 2002 00:58:18 -0700)
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-08!supernews.com!iad-peer.news.verio.net!news.verio.net!newsfeed.wirehub.nl!PeerFeed.KWeb.on.ca!dnews