>Hi,
>
>I have the code below as a method in a form, that when invoked gives the "Invalid key length (Error 112)" message, at the INDEX ON command:
>
> Procedure BuildTreeCursor
>* ---------------
> Create Cursor CurGrpUser ;
> ( ;
> aa_Tipo C ( 1), ;
> aa_Nivel N ( 2), ;
> aa_Server C ( 40), ;
> aa_Grupo C ( 40), ;
> aa_Descr C (170), ;
> aa_Path C (170), ;
> aa_Attrib C ( 2), ;
> aa_AttName C ( 10), ;
> aa_UltFlg N ( 1), ;
> aa_UserId C ( 40), ;
> aa_Dominio C ( 40), ;
> aa_UsrName C (100) ;
> )
>
> Index On aa_Descr + aa_Attrib + aa_UserId Tag PathUser
>
> . . . . . . .
> EndProc
>
>If I put the same code in a file called, say test.prg, and run it, it works well. Any reason for this behavior? (I'm using VFP6 SP5 on a win2k)
>
>Most intriguing is that the same procedure that activates this form is called by two completely different programs, built by two different project files: one works, the other don't. And both have the exact same calling sequence.
I seem to recall that if SET COLLATE is anything other than MACHINE, maximum key length is 120 instead of 240.
Regards. Al
"Violence is the last refuge of the incompetent." -- Isaac Asimov
"Never let your sense of morals prevent you from doing what is right." -- Isaac Asimov
Neither a despot, nor a doormat, be
Every app wants to be a database app when it grows up