🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: DBText choosing changing what record I display

#2360
From: Viatcheslav V. Vassiliev
Date: Sat, 30 Aug 2003 10:17
104 lines
3922 bytes
You may have three similar datasets and attach each edit to its own dataset.
Place three TADODataSet to form, connect one to data and then do

ADODataSet2->Recordset = ADODataSet1->Recordset;
ADODataSet3->Recordset = ADODataSet1->Recordset;

Now you have 3 datasets that use the same ADO recordset object. You can set
position in every dataset independently of others.

----------------------------------------------------------------
Regards,
Viatcheslav V. Vassiliev
http://www.oledbdirect.com
The fastest way to access MS SQL Server, MS Jet (MS Access)
and Interbase (through OLEDB) databases.

"Lee" <gobroski@elltel.net> �������/�������� � �������� ���������:
news:3f5058da$1@newsgroups.borland.com...
> Viatcheslav,
>
> Thanks, that worked great.  I was wondering if I can have three DBText
> labels all displaying different records on the same table.
>
> Like:
> DBText1 = Record 1
> DBText1 = Record 2
> DBText1 = Record 3
>
> Thanks for you help
>
> Lee
>
>
> "Viatcheslav V. Vassiliev" <support@oledbdirect.com> wrote in message
> news:3f4f120b$1@newsgroups.borland.com...
> > Look TDBNavigator component. You can traverse dataset with TDataSet
> method,
> > so you should call ADODataSet1->First(), ADODataSet1->Next() etc.
> >
> > ----------------------------------------------------------------
> > Regards,
> > Viatcheslav V. Vassiliev
> > http://www.oledbdirect.com
> > The fastest way to access MS SQL Server, MS Jet (MS Access)
> > and Interbase (through OLEDB) databases.
> >
> > "Lee" <gobroski@elltel.net> �������/�������� � �������� ���������:
> > news:3f4eff11@newsgroups.borland.com...
> > > OK, here is what I am trying to do.
> > >
> > >
> > >
> > > I would like to read the names out of an Access table that I have
> > populated
> > > using ADO methods.  The fields in the database are as fallows SID,
LAST,
> > > FIRST.  Now I only need to show the First and Last fields, and that is
> > easy
> > > I have that showing, but how do I change records to show the next set.
> > >
> > >
> > >
> > > This is what I am using to connect to the table:
> > >
> > > //data is the data module
> > >
> > > //DataSource is just a standard TDataSouce and that connects to the
> > > ADODataset
> > >
> > > DBText1->DataSource = Data->DataSource;
> > >
> > > //Datafield is Last
> > >
> > > DBText2->DataSource = Data->DataSource;
> > >
> > > //Datafield is First
> > >
> > >
> > >
> > > Is there a way I can choose what record set to display
> > >
> > >
> > >
> > > First record John Smith
> > >
> > > Click a Button
> > >
> > > Second record Jane Doe
> > >
> > > And so forth.
> > >
> > >
> > >
> > > Thanks for your help.
> > >
> > >
> > >
> > > Lee
> > >
> > >
> >
> >
>
>
Technical Details
Message-ID: <3f5079d4@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-06!sn-xit-08!supernews.com!newsfeed.wirehub.nl!news.kweb.on.ca!KWeb!newsgroups.borland.com!not-for-mail
References: <3f4eff11@newsgroups.borland.com> <3f4f120b$1@newsgroups.borland.com> <3f5058da$1@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII
X-Google-Thread: 10698b,ac159d18908241fd
X-Google-Attributes: gid10698b,public
X-Google-ArrivalTime: 2003-08-30 03:22:36 PST
From: "Viatcheslav V. Vassiliev" <support@oledbdirect.com>
Newsgroups: borland.public.cppbuilder.database.ado
References: <3f4eff11@newsgroups.borland.com> <3f4f120b$1@newsgroups.borland.com> <3f5058da$1@newsgroups.borland.com>
Subject: Re: DBText choosing changing what record I display
Date: Sat, 30 Aug 2003 14:17:31 +0400
Lines: 106
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1106
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106
NNTP-Posting-Host: 213.234.218.42
Message-ID: <3f5079d4@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1062238676 213.234.218.42 (30 Aug 2003 03:17:56 -0700)
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-06!sn-xit-08!supernews.com!newsfeed.wirehub.nl!news.kweb.on.ca!KWeb!newsgroups.borland.com!not-for-mail