Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Select Into Array Invalid?
Message
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00651113
Message ID:
00651129
Views:
15
VFP expects array name in Into Array clause. You've to use macro substitution in this case.
        STORE "ar" + Sys(2015) TO arCursors[iWords], lcArrayName
....
	Select cKeyVal ;
		From (lcQueryTable) ;
		Where Upper(cItmKey) Like ( cCurrWord ) Order By cKeyVal Top 500 ;
		Into Array &lcArrayName
>Running this code gives me the error "SQL: Statement is Invalid". What did I do wrong?
>
>Thanks.
>
>lcString = "universal thread"
>lcQueryTable = "allwords"
>For iWords = 1 to ( GetWordCount(lcString) )
>	arCursors[iWords] = "ar" + Sys(2015)
>	cCurrWord = Alltrim(GetWordNum(lcString,iWords)) + "%"
>	? "-----" + Alltrim(Str(iWords))
>	? cCurrWord
>	? (arCursors[iWords])
>	Select cKeyVal ;
>		From (lcQueryTable) ;
>		Where Upper(cItmKey) Like ( cCurrWord ) Order By cKeyVal Top 500 ;
>		Into Array ( arCursors[iWords] )
>Next
>
>
>This works fine in the command window if I hand-code-expand the lcQueryTable,cCurrword,arCursors values.
>
>Thanks.
--sb--
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform