Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to connect VFP database in remote server with IP address? 1

Status
Not open for further replies.

freddiekg

Programmer
Oct 13, 2009
25
MY
I try to develop a VFP application that uses DBC and DBF in the remove server with IP address. Please let me know how to do that (OLEDB method)? Also, is it possible to open the database using VFP OPEN/USE command.

Thanks in advance.
 
VFP Databases are files only, there is no server to connect to. That's why ODBC and also OLEDB Provider connectionstrings need a path to a folder of DBFs or a DBC.

There is no active component on the backend side listening to a port for SQL etc.

USE \\ipadress\folder\some.dbf in fact can work, but that needs security settings out of discussion and will not perform well anyway.

There are several ways you can go:

1. create a VPN connection and thereby make that remote server part of your LAN (virtually), that way you can access DBC and DBFs via normal UNC paths (\\server\folder\...)

That would be easy to setup but slow in performance.

2. put up some active component on the remote side, eg a webserver may be present. Then you could do the data retrieval local on the remote server and let it act via webservices.

That means major changes of data access code, but can gain good performance.

3. let clients not access data only remotely, but setup Terminal Services on the remote server, which will then serve the whole application remotely.

Bye, Olaf.
 
Hello freddie,

the question is: what is under your influence? Both client and server? Is it simply a hosted webspace you have on the server side? Is it a windows based host or a Linux system?

If the server is no windows system you'll not be able to use options 2 and 3.

If it's a webhoster you typically won't be allowed to make a VPN connection.

What you need to put VFP data on the internet will be a windows based host, idelly a server you have fully under control and not only some diskspace you can upload to via FTP as it's mostly with webhosters.

The typical webspace also offers a mysql database, that's another 4th option to your problem: Put data into a mysql database instead of VFP DBC/DBFs. IF your hoster allows remote access to the mysql database you can make a VFP client application accessing data via any remote data access technique VFP offers: remote views, SQL Passthrough or Cursoradapter via MySQL ODBC.

It all depends. Does the application plus database already exist and you want to put it on the internet? Is the application in the planning stage and are you free to change plans?

Bye, Olaf.
 
Dear Olaf,

Many thanks for your inputs.

The project requirements are:

(1) VFP 9.0 front-end
(2) DBC & DBF will be stored at a remote server in other country that has Windows Server 2008 installed.
(3) We have full control of the remote server.
(4) Plan to setup a secure VPN between the server and clients.
(5) VFP application will have about 15 users.

I am open for your suggestions and thanks in advance. Also open for suggestions on the VPN implementation.

Freddie
 
Okay, that sounds like a decent setup.

What matters about the VPN connnection is of course the bandwidth, but also the ping time as eg USE \\server\...\sometable.dbf does cause several read/seek commands going on, which read few bytes but each read/seek is needing at least 2 times the ping time between client/server.

The good part about VPN is, that it simply works as extension of the LAN. VPN does all the work of translating LAN access over the internet to the remote server and back. This is the meaning of virtual privat network. An application, also aVFP one will not see any difference to a LAN attached file server, despite the performance of the network depending on ping time and bandwidth.

You'll mainyly only need to change SET PATH to configure your app to the network path the data will be available for the new clients.

You might still have a better performance using terminal server or citrix, as that means the app itself runs remotely and terminal server will transfer just the few mousemevements and keystrokes from a TS client to server and the display graphics from the server o the client.

Graphics seems much more data transfer than data, but in the end it's also just changes of the graphics. Terminal server/citrix are performing very well on even smaller bandwidths like ISDN and besides a little lag of display refreshing you'll have the same performance of the app as it is local on the remote site.

A VPN extended network also is a good basis for TS/Citrix.

Now I don't have that much experience with VPN and VPN optimastion, you ma ask in forum463 about that aspect.

Bye, Olaf.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top