Board index » delphi » How can i use an index with IB Tables

How can i use an index with IB Tables

I'm using Delphi5 and Interbase, IBX components. But, when i was trying
to use the SetKey Method in de TIBTable component i realize that doesn'
exist this Method.

I need to search a record in the fast way possible. Maybe you can give
me an alternative.            Thanks

 

Re:How can i use an index with IB Tables


Quote
antonio wrote:

> I need to search a record in the fast way possible. Maybe you can give
> me an alternative.

        Don't use TIBTable at all.  Use a WHERE clause in a TIBQuery or
TIBDataset.

        HTH,

        -Craig

--
Craig Stuntz (TeamB)       Senior Developer, Vertex Systems Corp.
Delphi/InterBase weblog:   http://delphi.weblogs.com
Use Borland servers; posts via others are not seen by TeamB.
For more info, see http://www.borland.com/newsgroups/genl_faqs.html

Re:How can i use an index with IB Tables


The best IBX component for data entry is TIBDataSet. TIBTable and TIBQuery
are for migration porpuses. If you are writting new application use
TIBDataSet and TIBSQL.

Re:How can i use an index with IB Tables


Ok Craig, i think that is the best way  ,
But after locate the record, i need to modify some fields, then i need to
alter the record, if i use TIBQuery the result is read only information. How
can i modify the source record in the table. Do you have some idea?

I'm sorry, but i'm new in C/S databases ,i come from Desktop enviroments
like Paradox o DBase, and you know there are many diferences.

Thanks again

Quote
"Craig Stuntz (TeamB)" wrote:
> antonio wrote:

> > I need to search a record in the fast way possible. Maybe you can give
> > me an alternative.

>         Don't use TIBTable at all.  Use a WHERE clause in a TIBQuery or
> TIBDataset.

>         HTH,

>         -Craig

> --
> Craig Stuntz (TeamB)       Senior Developer, Vertex Systems Corp.
> Delphi/InterBase weblog:   http://delphi.weblogs.com
> Use Borland servers; posts via others are not seen by TeamB.
> For more info, see http://www.borland.com/newsgroups/genl_faqs.html

Re:How can i use an index with IB Tables


Ok, Sergio, pero este componente TIBDataset no puede ser actualizado
directamente desde un Data-aware control como un dbedit  o un dbgrid?
Quote
Sergio Samayoa wrote:
> TIBDataSet has InsertSQL, ModifySQL, RefreshSQL and DeleteSQL properties.
> Use it.

Re:How can i use an index with IB Tables


TIBDataSet has InsertSQL, ModifySQL, RefreshSQL and DeleteSQL properties.
Use it.

Re:How can i use an index with IB Tables


Si trabaja bien el TIBDataset Sergio, pero como puedo hacer para que lo pueda
actualizar tambien, es decir, es de solo lectura como puedo modificar?
Quote
Sergio Samayoa wrote:
> The best IBX component for data entry is TIBDataSet. TIBTable and TIBQuery
> are for migration porpuses. If you are writting new application use
> TIBDataSet and TIBSQL.

Re:How can i use an index with IB Tables


Of course it can. TIBDataSet connects to data aware controls via TDataSource
as any other TDataSet descendant.

Re:How can i use an index with IB Tables


Ok , you can see the information in the controls, but you can't edit nothing.
if you know how please tell me.
Quote
Sergio Samayoa wrote:
> Of course it can. TIBDataSet connects to data aware controls via TDataSource
> as any other TDataSet descendant.

Re:How can i use an index with IB Tables


Fill out the InsertSQl and the other Live SQL's needed.  You can use the Dataset
Editor to do it faster (right click on the IBDataset)

Quote
antonio wrote:

> Ok , you can see the information in the controls, but you can't edit nothing.
> if you know how please tell me.

> Sergio Samayoa wrote:

> > Of course it can. TIBDataSet connects to data aware controls via TDataSource
> > as any other TDataSet descendant.

--
Jeff Overcash (TeamB)
      (Please do not email me directly unless  asked. Thank You)
Anyone who cannot cope with mathematics is not fully human.
At best he is a tolerable subhuman who has learned to wear
shoes, bathe and not make messes in the house.   (Heinlein)

Re:How can i use an index with IB Tables


Jeff you're my hero, it works perfectly, fast and fine,
Why TIBTable works slower than TIBDataset? it's courius
Quote
"Jeff Overcash (TeamB)" wrote:
> Fill out the InsertSQl and the other Live SQL's needed.  You can use the Dataset
> Editor to do it faster (right click on the IBDataset)

> antonio wrote:

> > Ok , you can see the information in the controls, but you can't edit nothing.
> > if you know how please tell me.

> > Sergio Samayoa wrote:

> > > Of course it can. TIBDataSet connects to data aware controls via TDataSource
> > > as any other TDataSet descendant.

> --
> Jeff Overcash (TeamB)
>       (Please do not email me directly unless  asked. Thank You)
> Anyone who cannot cope with mathematics is not fully human.
> At best he is a tolerable subhuman who has learned to wear
> shoes, bathe and not make messes in the house.   (Heinlein)

Re:How can i use an index with IB Tables


Of course it works. I told you 5 replies before.
The other question is to loog and Jeff is the most apropiate guy to answer
that.

Re:How can i use an index with IB Tables


Quote
antonio wrote in message <3AFD2DF2.9173B...@yahoo.com>...
>Jeff you're my hero, it works perfectly, fast and fine,
>Why TIBTable works slower than TIBDataset? it's courius

It's not curious at all. TIBTable was designed to ease migration from
BDE apps using TTable and therefore has all the overhead needed to
emulate the behaviour of TTable. TTable was not designed to handle SQL
queries well and so TIBTable is not going to do much better. For any
new apps, or enhancements to old, any IBX component *except* TIBTable
should be used.

--
Wayne Niddery (WinWright Inc.)
RADBooks - http://members.home.net/wniddery/RADBooks/delphibooks.html
"At the apex of every great tragedy of mankind there stands the figure
of an incorruptible altruist" - Ayn Rand

Re:How can i use an index with IB Tables


Quote
antonio wrote:

> Jeff you're my hero, it works perfectly, fast and fine,
> Why TIBTable works slower than TIBDataset? it's courius

One reason is that it has to do more network traffic to figure out how to
correctly build the different SQLs.  Secondly more information comes across the
network in general and this will typically increase the number of network
packets needed to pull that data across and in many situations network traffic
is the biggest slowdown you will hit.

--
Jeff Overcash (TeamB)
      (Please do not email me directly unless  asked. Thank You)
Anyone who cannot cope with mathematics is not fully human.
At best he is a tolerable subhuman who has learned to wear
shoes, bathe and not make messes in the house.   (Heinlein)

Other Threads