🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: borland.public.cppbuilder.database.multi-tier
5 messages
5 total messages Started by JVB Mon, 02 Aug 1999 00:00
TDBGrid : How to get the rowcount ?
#10
Author: JVB
Date: Mon, 02 Aug 1999 00:00
16 lines
1272 bytes
Hi,

I'm looking for a way to get the rowcount in a TDBGrid object.
The data is filled in dynamically, but then i need to determine
programmically
what the rowsize is of each of the columns , so that i can make a
looping construct
to go by each row and then access the cell from that row in each of the
columns of the TDBGrid object. There is a Collumns Property, but no Rows
property ...
Does anyone have a clue ?

thanx already,

Jeroen
Computer Science Student
Re: TDBGrid : How to get the rowcount ?
#7
Author: nathan lunn
Date: Mon, 02 Aug 1999 00:00
1 lines
816 bytes
would the OnDrawColumnCell event be any use?
Re: TDBGrid : How to get the rowcount ?
#11
Author: Kent Reisdorph (TeamB)
Date: Mon, 02 Aug 1999 00:00
11 lines
1372 bytes
>>I'm looking for a way to get the rowcount in a TDBGrid object. The data is
filled in dynamically, but then i need to determine programmically what the
rowsize is of each of the columns , so that i can make a looping construct

Unless I'm not understanding what you are trying to accomplish, you don't
actually want to iterate the TDBGrid. Instead, you want to iterate the
underlying dataset (the DBGrid is directly tied to the dataset).

--
Kent (TeamB and TurboPower Software)
C++Builder Developer's Journal (http://www.reisdorph.com)
Re: TDBGrid : How to get the rowcount ?
#8
Author: Michael Lo
Date: Mon, 09 Aug 1999 00:00
22 lines
1425 bytes
 I think You can use RecordCount();
or use SQL Count(*) dynamically depends on what u are wirtting


JVB ���g��峹 <37A584D9.C2A4BC9A@thepentagon.com>...
>Hi,
>
>I'm looking for a way to get the rowcount in a TDBGrid object.
>The data is filled in dynamically, but then i need to determine
>programmically
>what the rowsize is of each of the columns , so that i can make a
>looping construct
>to go by each row and then access the cell from that row in each of the
>columns of the TDBGrid object. There is a Collumns Property, but no Rows
>property ...
>Does anyone have a clue ?
>
>thanx already,
>
>Jeroen
>Computer Science Student
>
Re: TDBGrid : How to get the rowcount ?
#9
Author: Mark Cashman (TeamB BCB)
Date: Thu, 19 Aug 1999 00:00
34 lines
1887 bytes
Hi, Jeroen!

Please don't crosspost, since it makes it hard for people to followyup
on your question. I have set followup to database desktop, since this is
not a multi-tier issue. Multi-tier is specific to client-server and
beyond.

To iterate through the rows of a dataset, use

    Table1->First();

    while (!Table1->Eof)
    {
        // do something
        Table1->Next();
    };

If you know the name of a field, you can use
Table1->FieldByName("something")->AsString (for instance) to access it.

If you need to iterate through the fields by index, use the
Table1->Fields collection.

Hope this helps.

--
------
Mark Cashman (TeamB - C++ Builder), creator of The Temporal Doorway at
http://www.temporaldoorway.com
- Original digital art, writing, music and more -
C++ Builder / JBuilder Tips and The C++ Builder Programmer's Webring
(Join us!)
http://www.temporaldoorway.com/programming/index.htm
------
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads