Board index » delphi » Newbie Question: IBX & Data Controls

Newbie Question: IBX & Data Controls

Please bear with me, I'me new to Delphi, Interbase, and object orientation.

I've managed to create an Interbase database, put a table in it, and
populate the table with two records using IBConsole.

On a Delphi form, I've put the following IBExpress controls: Database,
Transaction, Table. They all seem to connect properly and active properties
all set to true.

How do I get the records in the table to appear in a DBGrid? Or is that a
BDE only thingie?

Thanks for any help,

Curt

 

Re:Newbie Question: IBX & Data Controls


Put a TDataSource on your form.
Set the DataSource's DataSet property to the Table.
Set the DBGrid's DataSource property to the DataSource.

BTW. When you use a real SQL Server, like interbase, you get better
performance if you use a TIBquery instead of a TIBtable. Using a TIBtable
fetches all records to the client, a time consuming thing when the tables
have many records.

Alfred.

"Curt Putnam" <cput...@netwebb.com> schreef in bericht
news:3c2d09fb_1@dnews...

Quote
> Please bear with me, I'me new to Delphi, Interbase, and object
orientation.

> I've managed to create an Interbase database, put a table in it, and
> populate the table with two records using IBConsole.

> On a Delphi form, I've put the following IBExpress controls: Database,
> Transaction, Table. They all seem to connect properly and active
properties
> all set to true.

> How do I get the records in the table to appear in a DBGrid? Or is that a
> BDE only thingie?

> Thanks for any help,

> Curt

Re:Newbie Question: IBX & Data Controls


Quote
"Curt Putnam" <cput...@netwebb.com> wrote in message

news:3c2d09fb_1@dnews...

Quote

> I've managed to create an Interbase database, put a table in it, and
> populate the table with two records using IBConsole.

> On a Delphi form, I've put the following IBExpress controls: Database,
> Transaction, Table. They all seem to connect properly and active
properties
> all set to true.

> How do I get the records in the table to appear in a DBGrid? Or is that a
> BDE only thingie?

Use the same TDatasource component you would use when hooking up the BDE
TTable or TQuery. TDatasource works with any TDataset descendant which
includes the InternetExpress TIBTable, TIBQuery, TIBStoredProc and
TIBDataset.

For new development you really should avoid using TIBTable, it's main
purpose is to ease migration from BDE apps. Use TIBQuery (needs a
TIBUpdateSQL if you want editing) or a TIBDataset (fill out the different
SQL properties to handle the editing. In general, use query-type components
whenever you are working with an SQL server like Interbase. Table-like
components work best on flat file systems such as Paradox or Access.

--
Wayne Niddery (Logic Fundamentals, Inc.)
Learning Interbase? See
http://www.logicfundamentals.com/interbasecourseoutline.html
RADBooks: http://www.logicfundamentals.com/RADBooks/delphibooks.html

Re:Newbie Question: IBX & Data Controls


Thank you both;  Worked just fine.  Several days of frustration are now
ended.

Quote
"Curt Putnam" <cput...@netwebb.com> wrote in message

news:3c2d09fb_1@dnews...
Quote
> Please bear with me, I'me new to Delphi, Interbase, and object
orientation.

> I've managed to create an Interbase database, put a table in it, and
> populate the table with two records using IBConsole.

> On a Delphi form, I've put the following IBExpress controls: Database,
> Transaction, Table. They all seem to connect properly and active
properties
> all set to true.

> How do I get the records in the table to appear in a DBGrid? Or is that a
> BDE only thingie?

> Thanks for any help,

> Curt

Other Threads