Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Indexes with Interbase

Status
Not open for further replies.

EricDraven

Programmer
Jan 17, 2002
2,999
GB
Hello again,

How does Interbase handle Indexes? I have managed to create a database, convert my dbf files and altered the code of my program accordingly (see my other post here). The only problem I am getting now is that every time my program tries to set an index, it is returning the error "List index out of bound (-1)". Now I have seen this error many times on my wonderful travels through Delphi, but I cant see how it relates in this instance.

Many thanks to those of you who have helped me so far, I am determined to get this thing going so a little more help would be absolutely fantastic! :)


When your feeling down and your resistance is low, light another cigarette and let yourself go [rockband]
 
Set an index?

We aren't talking Paradox or dBase here :)

Indices are a server side thing - you don't use them on the client side.



Martijn Tonies
Database Workbench - the developer tool for InterBase and Firebird
 
Are you trying to access an empty listbox or combobox?

Steven van Els
SAvanEls@cq-link.sr
 
hi,

Creating an index is not that difficult. Via IBconsole and isql you can create an index.

CREATE INDEX CHANGEX ON SALARY_HISTORY (CHANGE_DATE);

In your programs you donn't use an index. Because it is better you donn't use TTable's. They are slowing down the process. Better is to use the Tqueries and use in your select statement an order by.

select * from SALARY_HISTORY Order by CHANGE_DATE.

This is exactly what you want. If you created an index the server will find out that there is an index and use it, if not it will give the same result. Depending on the amount of data it will take some milliseconds longer.

Steph [Bigglasses]





 
Amazing how you forget the simple things when its the last hour of the day! Driving home I thought to myself, "You stupid #!@**, just use Queries and the Order By function"!

So thank you to everyone who has helped me out so far. No doubt I shall be seeking your expert help again someday soon on another Interbase related matter!


When your feeling down and your resistance is low, light another cigarette and let yourself go [rockband]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top