Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Select Into 'self' not possible after Use Again
Message
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00343598
Message ID:
00352479
Views:
20
Mark,
Just use another name for the FIRST cursor, then the second, read/write cursor can have the correct name.
select * from table into cursor MyTempCursor nofilter
use dbf('MyTempCursor') again in 0 alias tmp
use in MyTempCursor
select tmp
You now have a read/write cursor named 'tmp'

HTH
Barbara


>select * from table into cursor tmp nofilter
>use dbf('tmp') again in 0 alias tmp2
>* use in tmp
>* select tmp2
>* use dbf('tmp2') again in 0 alias tmp
>* use in tmp2
>select * from tmp into cursor tmp

>Hi Cetin,
>
>Here is a way to reproduce what I mean, I create a cursor and then I'd like to make it read/write by using it again. I do this twice because I want it to have the same name. I'm not looking for an other way to do this but I'd like to find out why I get an "alias is already in use" error when I have reused it and not otherwise. In the code below it works fine but I don't have the tmp Cursor Read/Write. When you uncomment the commented lines you'll have a read/write tmp Cursor but the error will occur then.
>
>select * from table into cursor tmp nofilter
>use dbf('tmp') again in 0 alias tmp2
>* use in tmp
>* select tmp2
>* use dbf('tmp2') again in 0 alias tmp
>* use in tmp2
>select * from tmp into cursor tmp
>
>
Barbara Paltiel, Paltiel Inc.
Previous
Reply
Map
View

Click here to load this message in the networking platform