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

Problem with index 1

Status
Not open for further replies.

mkendi

Programmer
Oct 21, 2000
82
TR
In a table I have a character field with binary information (6 char) and a index for this field.
LOCATE finds the searched record, but SEEK returns always TRUE but stays in the first record.
The field is created as <char (binary)>.

I am using VFP6 SP5.

 
mkendi,

You can set the codepage to 1254 but you must SET COLLATE TO 'MACHINE'. Then re-create the index file. I think it will work

Regards

-- AirCon --
 
Yes, AirCon, this was it!!
First I have to remove the tag.
Then
SET COLLATE TO 'MACHINE'
INDEX ON KartNo TO KartNo_IDX
SET COLLATE TO 'TURKISH'

Thank you very much!
 
Would someone please explain WHY ...

SET COLLATE TO 'MACHINE'
INDEX ON KartNo TO KartNo_IDX
SET COLLATE TO 'TURKISH'

... fixed the problem? Thanks.

Slighthaze = NULL
 
Slighthaze,

Using Set collate to 'machine', ensure that characters in the index file are the same with characters in the table. While others COLLATE can produce different characters in the index file. Maybe this is where the problem was.

I never use others collate, so I don't know much about this also. You can read about SET COLLATE & Developing International Applications in VFP help


-- AirCon --
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top