Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Change table in Data Environment with cursor
Message
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00791603
Message ID:
00791618
Views:
19
This message has been marked as a message which has helped to the initial question of the thread.
I don't know exactly why you want to do this, but It came to my mind that you can do it in the BeforeOpenTables event in the DataEnvironment
something like this
asumming your table's in the dataenvironment name is yourTable and the object name for that table is Cursor1, lets say also the alias for yourTable is TableToSwitch
*:BeforeOpentables event in DataEnvironment
IF lUseCursor = .T. && I want use cursor
    *:Change the alias of your table in the dataenvironment first
    This.Cursor1.Alias = TableToSwitch1
    *:Now ahving the alias name free to use again then do your select into cursor <alias>
    SELECT * FROM ... WHERE ... INTO CURSOR TableToSwitch READWRITE && or table 
ENDIF
in your code you make reference to the table through the alias name so when your program say something like :
replace field1 with lcwhatever in TableToSwitch
the cnahges will be made wether in te cursor or the table dependin on your variable

hope this helps

regards
.......
DO WHILE .T.
      ME.Work()
ENDDO
Previous
Reply
Map
View

Click here to load this message in the networking platform