Thread View: borland.public.cppbuilder.database.multi-tier
3 messages
3 total messages
Started by pepito perez
Thu, 30 Mar 2000 00:00
names of tables and fields
Author: pepito perez
Date: Thu, 30 Mar 2000 00:00
Date: Thu, 30 Mar 2000 00:00
8 lines
703 bytes
703 bytes
Hello, I have a DataBase and I would like to retrieve the names of the tables and the names of the fields of each table. It�s possible to do it with DataBase component ? Thanks in advanced.
Re: names of tables and fields
Author: Steve Pietrykoski
Date: Thu, 30 Mar 2000 00:00
Date: Thu, 30 Mar 2000 00:00
13 lines
895 bytes
895 bytes
Look at the methods of TSession. There is a Session object automatically created for you. pepito perez wrote: > > Hello, > > I have a DataBase and I would like to retrieve the names of the tables and > the names of the fields of each table. > > It�s possible to do it with DataBase component ? > > Thanks in advanced.
Re: names of tables and fields
Author: Mark Cashman (TeamB)
Date: Tue, 04 Apr 2000 00:00
Date: Tue, 04 Apr 2000 00:00
25 lines
1372 bytes
1372 bytes
Hi, Pepito!
Have a look at
http://www.temporaldoorway.com/programming/cbuilder/databaseandbde/scanningtorefresh.htm
It gets you most of the way there. Just add this level as a yet more
innermost loop after the DataSet variable is set
for (int FieldIndex = 0; FieldIndex < DataSet->FieldCount; FieldIndex++)
{
TField *Field = DataSet->Fields->Fields[FieldIndex];
// Do what you want here
};
Note that "DataSet->Fields->Fields[FieldIndex]" is not a typo, but is
the BCB4 and above correct usage (ugly but true).
------
Mark Cashman, TeamB C++ Builder
http://www.temporaldoorway.com/programming/index.htm
C++ Builder, JBuilder programming information
Home of The C++ Builder Programmer's Webring - Join us!
------
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