This is 3rd time I'm trying to reply since I got. I had connection problems.
Snip...
>>Field sizes and/or leading spaces ? Try with alltrim(), SQL 2 should never fail provided the record exist (if deleted on - not deleted). If still failing could you zip dbf, fpt and cdx (dbc of course) and mail them ?
>>Cetin
>
>Thanks, Finally I fix it but quite strange!!
>Field sizes are same!! of cos, else other fields can't search!!
>Alltrim() it already!! Even I type:
>Use item
>replace itemkey with alltrim(item) for .t.
>use && of cos, option have set no buffering
>and also does it in Chooseit!
I didn't say to do this in table but SQL.
>
>Finally, I copy and replace the Chooseit.itemkey and success.
>but previously, even I copy item.itemkey field to chooseit.itemkey but fail.
>Possible reason(s) I wonder:
>1) If add detailtable first but no match on Base lookup table,
>the link will fail.
>but if lookup table got the data first, the detailtable(many side)
>can look it up.
In fact it looks it up everytime and link would only succeed if there is a match.
>2) Table Buffering Os. (5) may got trouble on update.
>need check a lot!
Table buffering is no trouble but you must understand it first.
>
>~_~' Anyway, Thanks a lot, but sorry to email the data file as
>security reason. if the data table is not item, but other less important,
>i will ask my boss b4 sent.
No need for data anymore, things are clearer now. You're trying to SQL select buffered recs. AFAIK You cannot SQL select non-existent records (use tableupdate first). If there is a way to do it before committing I want to know too.
create cursor testdbf (dummy c(10))
cursorsetprop("Buffering",1)
insert into testdbf values ("Test0")
cursorsetprop("Buffering",5)
insert into testdbf values ("Test1")
insert into testdbf values ("Test2")
insert into testdbf values ("Test3")
select * from testdbf where dummy="Test"
tableupdate(2,.t.,"testdbf")
select * from testdbf where dummy="Test"
select testdbf
1
replace dummy with "Notest"
select * from testdbf where dummy="Test"
tableupdate(2,.t.,"testdbf")
select * from testdbf where dummy="Test"
Cetin