Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Fields in a cursor
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00566548
Message ID:
00566596
Views:
11
You don't have to prefix in the field list cCursor4 and you can scatter memvar memo in cCursor1, so you would use m.pp, m.fname, etc. Or you should use Larry's suggestion or another alternative would be evaluate(cCursor+".pp"), etc.

>>>I keep getting syntax error when I save my code. I'm trying to reference fields in my cursor as below. Is it not possible to refer to fields in cursor as (cursor).field ?
>>>
>>>
>>>
>>INSERT INTO (cCursor4) ((cCursor4).c1, (cCursor4).c2, (cCursor4).c3, (cCursor4).c4, ;
>>	(cCursor4).c5, (cCursor4).c6, (cCursor4).c7, (cCursor4).c8, (cCursor4).c9, ;
>>	(cCursor4).c10) ;
>>	VALUES((cCursor).pp, (cCursor).fname, (cCursor).totpay, (cCursor).fica,  (cCursor).retire_amt, ;
>>	(cCursor).health_ins, (cCursor).retiree_med, (cCursor).unempins, (cCursor).wrkcompins, ;
>>	(cCursor).total_salary)
>>				
>>>
>>>
>>>
>>>Thanks
>>>Nick Patel
>>
>>I believe you have to use
>>
>>&cCursor4..
>>
>>You must use the double "." because the first . stops the macro substitution and the second will be used in the expression.
>>
>>HTH.
>
>
>I tried (&cCursor4)".".fname and it did allow me to save, but when I ran the program, it gave me a syntax error. I even tried (&cCursor4).fname and it still gave me an error. Apparently it sees the value in &cCursor4 just fine, it just doesn't understand fname.
>
>Thanks
>Nick Patel
If it's not broken, fix it until it is.


My Blog
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform