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 Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Connection to FoxPro from ASP.NET

Status
Not open for further replies.

dpdg

Programmer
Joined
May 23, 2005
Messages
148
Location
US
I want to create a web site that uses ASP.NET and connects to FoxPro tables on a server in a different location.

How do I create the connection string (in .NET) so that I make the connection?

This would make a local connection:

"Provider=vfpoledb.1;Data Source=C:\MyDataDirectory\;Collating Sequence=general"

but I need to reference tables on a different server.

Do I use something like:

Data Source=198.451.1.04

or

Server=vfp.myserver.com

I'm supposing that the server hosting the FoxPro tables would have to have a static IP.

 
I think you would need to create a virtual directory on the server you are 'talking' to which is a share on the other server.

This works ok, where the servers are both 'closely coupled' by a link of 10Mb or better (i.e. on a local LAN) and can even be non MS (I have set up stuff like this on shares located on Netware and Snap Servers).

If your remote server is not closely coupled (perhaps available via the internet with ADSL or similar) the performance is rubbish - so bad you will not want to use it.

Where is your 'different' server?

To get the virtual directory working you are going to need identical usernames and passwords on bother machines, and set up the anonymous acces to use the username... there are articles on MSDN to explain this.

Regards

Griff
Keep [Smile]ing
 
This is the situation:

There is an existing FoxPro Application residing on a server in our office at a location within a plant (a refinery). But we are not allowed connection within their LAN. What we have been doing in most places is using a VPN for them to get access to our system. But in this particular plant their company will not allow us an open port to do that.

Their empolyees basically only need the functionality to request and approve equipment rental which has to be done through our system.

However, they have internet access. If we had a web interface that connected to the FoxPro Tables on the server in our office, they could do their business they need to do with us over the internet without the security issues within their LAN.

Code:
Plant employees <--> Web App <--> FoxPro tables at our office

Clear as mud?
 
I think I have that, you hold the data locally on one server and have a web server connected to the internet, the remote users just need a simple web interface to update the status of some records.

You should be able to do this with a virtual directory on your web server - pointing at the database on your regular application (presumably on another server 'visible' to your web server).

To get it to work, you need to create a user on both machines with identical passwords and username and set up the permissions on the virtual directory to allow access to that virtual folder - then you cen get the VFP oledb provider to read/write the data.


There is a good guide on this here
The asp call will look at bit like this:

Code:
Provider=VFPOLEDB.1;Exclusive=No;Data Source=\\MyOtherServer\SHARE1\MyDatabaseFolder\MyDatabase.dbc;

Good luck

Regards

Griff
Keep [Smile]ing
 
Carlos,

You should probably raise this as a new thread -or I'll be the only one reading it!

And, sorry, I can't help on this one!

Regards

Griff
Keep [Smile]ing
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top