Solved

Accessing a Database Remotely Via a VPN Connection

Posted on 2004-08-07
3
196 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

Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Replace &lt; with < 14 59
Error in script 11 56
Error on link 14 47
tableview is not updating 1 8
Article by: Najam
Having new technologies does not mean they will completely replace old components.  Recently I had to create WCF that will be called by VB6 component.  Here I will describe what steps one should follow while doing so, please feel free to post any qu…
Entity Framework is a powerful tool to help you interact with the DataBase but still doesn't help much when we have a Stored Procedure that returns more than one resultset. The solution takes some of out-of-the-box thinking; read on!
Microsoft Active Directory, the widely used IT infrastructure, is known for its high risk of credential theft. The best way to test your Active Directory’s vulnerabilities to pass-the-ticket, pass-the-hash, privilege escalation, and malware attacks …
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

772 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