Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Invalid key lenght
Message
From
25/02/1997 14:11:33
 
 
To
25/02/1997 13:33:40
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00021912
Message ID:
00021991
Views:
45
>>>I get the error 'Invalid key length' when :
>>>
>>>select a.ADDRESS1,a.ADDRESS2 from DONOR a group by a.ADDRESS1,a.ADDRESS2 having count(*)>1 into cursor temp
>>>
>>>select a.ADDRESS1 as ADDRESS1 from DONOR a ,temp b where a.ADDRESS1=b.ADDRESS1 and a.ADDRESS2=b.ADDRESS2 order by a.ADDRESS1,a.ADDRESS2 into cursor result
>>>
>>>I attemp to find out record with duplicate value of address1 and address2.
>>>The error locate at the second select statment.
>>>I have try
>>>- reindex the donor table
>>>- add 'where .t.' at the first select statement
>>>but still get the error. Why?
>>>
>>>Info: Address1 and Address2 are character fields of length 50.
>>>
>>>Thanks
>>>-Jasper
>>
>>Jasper: Don't you have to have an ADDRESS2 field in your second select. All the fields in your ORDER BY clause must be in your SELECT clause:
>>
>>
>>select a.ADDRESS1 as ADDRESS1;
>>a.ADDRESS2 as ADDRESS2;
>>from DONOR a ,temp b where a.ADDRESS1=b.ADDRESS1 and a.ADDRESS2=b.ADDRESS2 order by a.ADDRESS1,a.ADDRESS2 into cursor result
>>
>>
>>Note the second line.
>>
>>HTH
>>Barbara
>
>I still get the error even :
>
>select a.ADDRESS1,a.ADDRESS2 from DONOR a where .t. group by a.ADDRESS1,a.ADDRESS2 having count(*)>1 into cursor temp
>
>select a.ADDRESS1 as ADDRESS1 ,a.ADDRESS2 as ADDRESS2 from DONOR a ,temp b where a.ADDRESS1=b.ADDRESS1 and a.ADDRESS2=b.ADDRESS2 order by a.ADDRESS1,a.ADDRESS2 into cursor result
>
>I don't know why????
>Please help me .....

My God! Same table, Same code, no problem in fpw2.6
But error at vfp3.0! I am dying
oh, what is the fastest way to write good program?
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform