Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Practical uses for SQLIDLEDISCONNECT()
Message
 
To
30/08/2022 14:13:30
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
01684846
Message ID:
01684911
Views:
54
>>>>This also works with remoteviews. You only have to place your connectionCheck Code before requery/use RemoteView...
>>>
>>>Preferrably in .BeforeRequery() event of your base CursorAdapter class...
>>
>>Nice example why Cursoradapter in the long run will be much better than RV.
>>Bad part is, Luis uses RV in this app.
>>As I have no idea how many RV are in use, how many apps he supports, it might be premature to hint at moving from RV to cursoradapter.
>>
>>Does not stop me - CA and similar Dotnet structures IMO were best fit to link remote data to local machine. If Luis has hundreds of RV, (half-)automatic might be possible.
>>
>>Not overblown like most ORM, but possible to use OOP ease of structured code.
>
>Thank you Thomas.
>
>I've been using RVs since VFP 6 (around 1999). I began developing apps with a small framework I found somewhere (I'm still using it, although improved with new technologies of new version of VFP. This framework uses RVs automatically opened in forms' DataEnvironment, so, I got used to it. What I liked about it is that It can manage transactions on several RVs at once just by making a change on the app object property.
>
>Well, to make it short. I don't have control on RVs that are opened automatically when the forms are instantiated I just can have control on both requeries and SQLEXECs I use for my reports.
>
>When CAs appeared I was very interested on them but I haven't had enough time for making the conversion from RVs as I guess that would take too much time because of the way the framework works. I believe the hardest part to using SQLIDLEDISCONNECT() function is calling it before the RVs are automatically opened on each form.
>
>OTOH, In the near future I would like to change the use of RVs with CAs, but that would be another story.
>
>
>
>,
>So, I guess the hard part

I put the remote views in my forms as well -- however I have NoDataOnLoad = .T. --- so the remote views don't open when the form opens.

One of the other things I did with remote views -- I use the 'parameters' feature of the view. This enables me to keep track of all the views , their parameters, and the parameter's values. I then created a classlib to deal with all of that along with the requeries and table updates. So the cool part about all that is that I have a timer in my app -- if the user is not in 'edit' mode then the data refreshes every x seconds (a value set in a config table).... and when it does the auto-requery, it puts the user back on the same record they were on. This way the user is always looking at current data.
I even do this when hitting VFP data -- yes I use remote views against foxpro tables --- remote views don't require the table to be open like remote views -- and IF you do everything right -- switching between VFP tables, SQL, Oracle or whatever can be done by simply changing the connection string. Done this quite a few times and it works great.
ICQ 10556 (ya), 254117
Previous
Reply
Map
View

Click here to load this message in the networking platform