Probably you need this instead:
tsconnstr = "Select TS" + AllT(Str(Year(Date()))) + ;
"- + Str(Int(Max(Val(SubStr(tsindex,8,15))))) InTo Cursor myNextIndex"
....
Then VFP may see the difference between MAX() vfp function and MAX FIELD field function in SQL expression.
>I am trying to code a SQL string to pick the Max value in a remote table.
>
>My string:
>
>tsconnstr = "Select TS" + AllT(Str(Year(Date()))) + "-" + Str(Int(Max(Val(SubStr(tsindex,8,15))))) + " InTo Cursor myNextIndex"
>
>I am getting an error "Too Few Arguments" It seems like the Max() is causing the problem.
>
>Please help.