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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

table has no index order set ????

Status
Not open for further replies.

GaryWilsonCPA

Technical User
Jul 19, 2000
253
0
0
US
I am trying to do a search and I get the error "table has no index order set" I have set my clients file with several fields that are indexed.

I am using a textbox on a form with this code in the keypress area of the text box


LPARAMETERS nKeyCode, nShiftAltCtrl

* SaveAlias() Saves current ALIAS()

lcData = ALLT(THIS.Value)+ CHR(nkeyCode)
Any ideas?


SELE clients && Select Alias()
SET NEAR ON
SEEK UPPE(lcData)
SET NEAR OFF

RELE lcData

THISFORM.list1.Refresh()

* RestAlias() Restore old ALIAS()
 
Look in the help under 'SET ORDER' for details on what you should do. In a lot of cases you don't have to have an order set to use a table, but if you're doing a SEEK or a couple of other things, you do. I have to admit it's one of the things which always confuses me too, and I have to look it up every time I run into that error.

Dave Dardinger
 
SEEK can only be used if an index is used. It will search according to the index.
Use LOCATE FOR <expression> if you do not wish to create an index.

HTH,

Weedz (Wietze Veld)
My private project:Download the CrownBase source code !!
 
If the seek is on an index, but the table is currently not ordered, but in different order, use the full seek syntax:

Seek(SeekFor, Table, Index)

so that if your index is called MyIndex, the call would be

=Seek(UPPE(lcData), &quot;Clients&quot;, &quot;MyIndex')
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top