?
Solved

Accessing a Database Remotely Via a VPN Connection

Posted on 2004-08-07
3
Medium Priority
?
202 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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 1400 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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

In order to hide the "ugly" records selectors (triangles) in the rowheaders, here are some suggestions. Microsoft doesn't have a direct method/property to do it. You can only hide the rowheader column. First solution, the easy way The first sol…
Introduction Although it is an old technology, serial ports are still being used by many hardware manufacturers. If you develop applications in C#, Microsoft .NET framework has SerialPort class to communicate with the serial ports.  I needed to…
NetCrunch network monitor is a highly extensive platform for network monitoring and alert generation. In this video you'll see a live demo of NetCrunch with most notable features explained in a walk-through manner. You'll also get to know the philos…
This is my first video review of Microsoft Bookings, I will be doing a part two with a bit more information, but wanted to get this out to you folks.
Suggested Courses

770 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