RE: VFP and VPN

Author: Gilbert M. Hale

Posted: 2003-10-12 at 12:29:00

Fabiano,

I agree with Brian re: how to run a VFP app over a low bandwidth connection

if you are using VFP in a traditional manner where one or more tables are

being opened and used directly. I have found Windows Terminal Services to

be a fine solution, provided you do not require a table to be used

exclusively, such as using a table on a local PC exclusively to prevent a

2nd instance from running on that local machine. The reason is that the

"local machine" is actually a shared machine (due to the way Terminal

Services Server works), so a table on Drive C: that is used exclusively to

prevent an app from running a 2nd instance in a conventional network File

Server environment is actually being opened exclusively on the Terminal

Services PC on what is effectively a shared resource. So the 2nd person who

will try to run the app via Terminal Services will try to open the "control

table" exclusively a second time on the Terminal Services PC and the app

will fail.

The way I "got around" this matter without having to support 2 sets of apps

for the same product (named "DCMS"), one for LAN and one for Terminal

Services, is by using the VFP OS() function as in the following code

snippet:

&&-----------------------

LOCAL mOSVersionTerminalServices, mOSVersion2000Server, mLocalDCMSNotInUse

mOSVersionTerminalServices = VAL(OS(10)) &&Terminal Services Installed

mOSVersion2000Server = VAL(OS(11)) &&Using Windows 2000 Domain Controller

Server/Server

OPEN DATABASE AppDBCLocalDCMS SHARED

IF (BETWEEN(mOSVersionTerminalServices, 16, 24) OR ;

BETWEEN(mOSVersionTerminalServices, 48, 54)) AND ;

mOSVersion2000Server >= 2

mLocalDCMSNotInUse = .F.

ON ERROR mLocalDCMSNotInUse = .T.

SELECT LoggedOn

ON ERROR

IF mLocalDCMSNotInUse = .T.

USE AppDBCLocalDCMS!LoggedOn IN 0 SHARED

ENDIF

ELSE

ON ERROR QUIT &&Simple Way To Prevent > 1 Instance Of DCMS From Running

USE AppDBCLocalDCMS!LoggedOn IN 0 EXCLUSIVE

ON ERROR

ENDIF

&&-----------------------

I use pcAnywhere and VNC over VPN connections with client locations ranging

from Puerto Rico to California with excellent results, but that is a method

of providing remote support. I have not found it to be a practical way to

deploy an app over a thin-net connection.

If you were to convert the VFP app to use SQL Pass Through cursors instead

of traditional VFP tables, and get the record selection criteria set up to

not retrieve huge data sets (SQL Select "TOP nnn"), you will find this an

effective way to get VFP to run across a thin-net connection. Recently an

associate and I have opted to use VFP on the front end to build an app using

MySQL on the back end. Through his excellent SQL Pass Through techniques my

associate has gained excellent performance over an Internet connection

(cable modems at each end). The use of MySQL was driven by the need to

allow table sizes > 2Gb, but the thin-net SQL Pass Through performance was a

factor in deciding to use SQL Pass Through whether it would have been MySQL,

VFP or some other vendor's tables on the Server.

Good Luck!

Gil

Gilbert M. Hale

New Freedom Data Resources

Pittsford, NY

585-359-8085

gil@gilhale.com

> -----Original Message-----

> From: profox-bounces@leafe.com [mailto:profox-bounces@leafe.com]On

> Behalf Of Brian Abbott

> Sent: Sunday, October 12, 2003 2:04 AM

> To: 'ProFox Email List'

> Subject: RE: VFP and VPN

>

>

> Fabiano

>

> A VPN on its own doesn't give you enough bandwidth to run VFP.

> But what you

> can do, having got your VPN working, is to use Windows Terminal

> Services or

> Citrix Metaframe or VNC (www.realvnc.com) or pcAnywhere to run

> VFP remotely

> inside the VPN. Any of these options work very well.

>

> ============

> Brian Abbott

>

> ACA Systems

> ============

>

> > -----Original Message-----

> > From: profox-bounces@leafe.com

> > [mailto:profox-bounces@leafe.com] On Behalf Of Fabiano Araújo

> > Sent: Sunday, October 12, 2003 5:33 AM

> > To: profox@leafe.com

> > Subject: VFP and VPN

> >

> >

> > Can I connect my pc in VPN (Virtual Private Network) using my

> > VFP application ¿

> >

> > Please contact me !

> >

> > Thank you !

> >

> > Fabiano Araújo

> >

> >

> >

[excessive quoting removed by server]

©2003 Gilbert M. Hale