Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Local and Remote Views for the same cursor.
Message
From
04/09/1998 10:02:39
 
 
To
04/09/1998 09:57:21
Scott Knight
Human Resources Development Canada
St. John's, Newfoundland, Canada
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00133243
Message ID:
00133265
Views:
12
Hi Scott ----

I meant something different. Lets say you have those two identical views, lvclient and rvclient. What I am saying is to create a *third* view, local --- well call it dlview, that is SELECT * FROM lvclient -or- SELECT * FROM rvclient. In your data environment, use dlview and map all your controls to dlview. All you have to do for different versions of the application is change the query in the database for dlview. See?

Another way to do it is to map controlsource to objects created by a data wrapper and swap out the wrapper.



>>
>>You don't want to change a view from local to remote. What you want to do is make all of your controls bound to a local view which has a source of either another local view or a remote view. Put in a "translation layer" for the data, basically.
>>
>>
>>>Is it possible to change the CursorSource at run-time from a local view to a remote view. Both views have to same structure expect one is from VFP and the other SQL Server. To the app the to cursors function the same. If I could change the source based on a indicator I could run the same application in for local data as I do remote.
>>>
>>>Thanks in advance
>>>
>>>
>>>Scott k
>Hi John
>
>The controls on the form are bound to the cursor alias regardless of what data the cursor is bound to. I think were talking abou the same thing. The problem is changing the DataEnviroment.cursor1.CursorSource = "LVclient" (local View of client) to be something like DataEnviroment.cursor1.CursorSource = "RVclient" (remote view of client) at run-time. Cursor1 would be given the same alias "client" regardless of the source. All controls would be bound to client.fname, client.sname etc.
>
>Thanks
>
>
>Scott
------------------------------------------------
John Koziol, ex-MVP, ex-MS, ex-FoxTeam. Just call me "X"
"When the going gets weird, the weird turn pro" - Hunter Thompson (Gonzo) RIP 2/19/05
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform