Solved

Accessing a Database Remotely Via a VPN Connection

Posted on 2004-08-07
3
194 Views
Last Modified: 2010-04-15
I need to be able to access a database that resides on a remote machine. I have already successfully set up a VPN connection on my machine, which is fully functional.

How do I go about connecting, programmatically to the remote database? I am hoping that a simple modification to the ConnectionString would do the trick. So in the following snippet:

conn.ConnectionString = @"Provider=Microsoft.Jet.OLEDB.4.0;" + @"Data source=C:\Test\Data\Users.mdb";

I would change the code following the Data source to reflect the full path informtion for the remote database. Is this correct? What would a proper connection string look like?

Thanks!

- nhc
0
Comment
Question by:nh_capricorn
3 Comments
 
LVL 22

Expert Comment

by:cookre
ID: 11743584
I'd use MapDrive() then just use that drive letter in the connection string.
0
 
LVL 37

Accepted Solution

by:
gregoryyoung earned 350 total points
ID: 11743690
Access databases have some issues working over networks ... you could either map the drive or use a full path "\\machine\directory\file.mdb"

if you are going to be running JET over the network I would recommend looking at a few alternatives

1) use remoting to provide a central data broker (i.e. only one macine connects to the database and proxies the data through remoting to the clients) this would also add the benefit of not needing to be able to access the drive where the database lives to access data (i.e. you could put it on the internet etc without opening a huge security hole)
2) use MSDE as its free and much morre stable.

0
 

Author Comment

by:nh_capricorn
ID: 11757899
Thanks everyone!

I need to consider both suggestions before I make a final decision. Once that's done, I'll award the points accordingy.

- nhc
0

Featured Post

Enabling OSINT in Activity Based Intelligence

Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

Join & Write a Comment

We all know that functional code is the leg that any good program stands on when it comes right down to it, however, if your program lacks a good user interface your product may not have the appeal needed to keep your customers happy. This issue can…
This article is for Object-Oriented Programming (OOP) beginners. An Interface contains declarations of events, indexers, methods and/or properties. Any class which implements the Interface should provide the concrete implementation for each Inter…
It is a freely distributed piece of software for such tasks as photo retouching, image composition and image authoring. It works on many operating systems, in many languages.
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…

708 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now