Solved

Accessing a Database Remotely Via a VPN Connection

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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

This article introduced a TextBox that supports transparent background.   Introduction TextBox is the most widely used control component in GUI design. Most GUI controls do not support transparent background and more or less do not have the…
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…
This Micro Tutorial demonstrates using Microsoft Excel pivot tables, how to reverse engineer competitors' marketing strategies through backlinks.
As a trusted technology advisor to your customers you are likely getting the daily question of, ‘should I put this in the cloud?’ As customer demands for cloud services increases, companies will see a shift from traditional buying patterns to new…

867 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