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

set relation to and index files

Status
Not open for further replies.

marcfree

Programmer
Jul 4, 2002
31
BR
Hi,

I have a table which main field is the record number of the client and it is a combination of ascii codes like Xx, or S" etc. If I want to set relation with another table to the same field, foxpro considers that Xx is the same as xX and I can't establish a right relation between the two tables. Any sugestion to solve this problem?
 
Is it possible your index looks at the field in lower or uppercase, such as UPPER(fieldx)? Also make sure to REINDEX the table to be sure the index is not corrupted?
 
Thank you for your answer.

No. The field name is fixnum and the index is to fixnum also and not to upper(fixnum) or lower(fixnum). I tried to reindex both table but it stil doesn't work.
 
I just made a trial of your situation.

I created TEMP1 with only 1 field named Field1 and the did
Index on Field1 TAG key
I then duplicated the process for a TEMP@ table which also only has 1 field FIELD1

After inputing values into both tables of:
xX
yY
zZ
Xx
Yy
Zz

I then set up the relation on Field1

Even with SET EXACT OFF
Foxpro accurately distinguished between xX and Xx and, consequently, found the correct records
-- not mixing up xX with Xx

Therefore you must have something else wrong.

Perhaps, like is suggested above, your INDEX expression is built using something more complex than you suggest.

You can open both tables and use:
ACTIVATE WINDOW VIEW
and then go into SETUP to see the expression on which the index was built.
Check this to see where the problem might exist.

Good Luck,


JRB-Bldr
VisionQuest Consulting
Business Analyst & CIO Consulting Services
CIOServices@yahoo.com
 
marcfree,
.."I tried to reindex BOTH table but it stil doesn't work"..
As for relation is important only child indexing,
right relation for example:
use table2 in 2
index on field1 tag key
use table1 in 1
set rela to field1 into table2
...and it MUST differ lower and upper case !
How you find out opposite ?
(Your code ? Error be probably outside relation..)
set near off ?
Tesar
 
Thank you for your help again.

May I attach the files to an e-mail and send it to you so you can analyze it better?
 
No problem.



JRB-Bldr
VisionQuest Consulting
Business Analyst & CIO Consulting Services
CIOServices@yahoo.com
 
Can you post the index expression you are using to create the index?


Dave S.
[cheers]
 
It's just the name of the field. No expression at all.
 
When I changed the set collate from general to machine it worked fine.

Thanks everybody for helping me.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top