Thanks, I'd missed the separator between lines.
I'm still not getting a cursor on the VFP side. I've played around with some other variations, to no avail. Code fine works in QA.
Any other thoughts, or suggestions on debugging SPT?
TIA,
Jay
>Terminate each line with a semi-colon.
>
>-Mike
>
>>Michael --
>>
>> SQL access is set up through our internal framework.
>>
>> This is a very simple test program. lnResult is 1. But, csrAPItems doesn't appear in the current data session.
>>
>>
>>
>>* Create SP string with:
>>* 1. Table variable.
>>
>>lcSQL = "declare @csrAPItem table (fpokey Char (12) NOT NULL) "
>>
>>* 2. Insertion of a value into table variable
>>lcSQL = lcSQL + "INSERT INTO @csrAPItem (fpokey) VALUES ('706652 11 0') "
>>
>>* 3. Join with main table
>>lcSQL = lcSQL + "SELECT a.* from apitem a inner join @csrAPItem b ON a.fPOKey = b.fPOKey"
>>
>>lnResult = SQLEXEC (lnHandle, lcSQL, "csrAPItems")
>>
>>