Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
SCATTER and remote views
Message
From
21/09/2002 22:10:48
Raul Davila
Davila Programming Services
Toa Alta, Puerto Rico
 
General information
Forum:
Visual FoxPro
Category:
Client/server
Miscellaneous
Thread ID:
00702991
Message ID:
00703128
Views:
18
As usual, the simple ones are the ones that catch you.
Yes, the variables were going out of scope.
I don't usually use SCATTER, that's why I didn't see the scope problem.
SCATTER NAME did the trick.
VFP documentation doesn't say 'm.*' variables created with SCATTER are private in scope.

Thanks


>Why are you using SCATTER in the first place? Variables create this way are private in scope and would be visible only in the metod they created in. Anyway, consider using SCATTER NAME.
SCATTER NAME loRecord
>? loRecord.itemid
>? loRecord.itemname
>? loRecord.itemdesc
You can use form/class property instead of loRecord so it wouldn't go out of scope.
>
>>Hi,
>>I'm having a problem in VFP6 where SCATTER is not working corectly with a parameterized remote view.
>>The problem is that the 'm.varname' variable is not being created for the field where the filter parameter is applied.
>>
>>Example:
>> SQL Server table
>> itemid int -> PK
>> itemname char 30
>> itemdesc varchar 100
>>
>> CREATE SQL VIEW myview REMOTE CONNECTION 'SQL Connection' AS ;
>> SELECT * FROM dbo.Inv_items Inv_items ;
>> WHERE Inv_items.itemid = ?nItemIdFilter
>>
>>SCATT MEMV
>>?m.itemname
>> The name of the item
>>?m.itemdesc
>> The description
>>?m.itemid
>> ERROR -> Variable "ITEMID" is not found
>>
>>I did this in the command line alone to eliminate possible errors on my code and the problem persists.
>>
>>Any ideas?
>>
>>Thanks
R. Davila
DBA / Network Administrator
Administracion de Fomento Comercial
Gobierno de Puerto Rico

Still waiting for FoxPro for LINUX
Previous
Reply
Map
View

Click here to load this message in the networking platform