Solved

Connecting to a remote database ....

Posted on 2003-10-28
10
268 Views
Last Modified: 2010-04-17
In .NET (or for that matter any language or platform), if we have the IP address of a remote server, which is on the internet, can we connect to it, and access the RDBMS on it ?
0
Comment
Question by:moko
[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
  • 4
  • 3
  • 2
  • +1
10 Comments
 
LVL 22

Expert Comment

by:cookre
ID: 9638767
I use GetDriveType() to step through drive letters looking for an available one, use WNetAddConnection2() to map a drive to the remote, then have at it with, among others, OleDbConnection.
0
 
LVL 70

Expert Comment

by:Éric Moreau
ID: 9638896
0
 
LVL 8

Expert Comment

by:fozylet
ID: 9639232
"Provider=sqloledb;Data Source=190.190.200.100,1433;Network Library=DBMSSOCN;Initial Catalog=pubs;User ID=sa;Password=asdasd;"

see http://www.connectionstrings.com/
0
Industry Leaders: 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!

 
LVL 22

Expert Comment

by:cookre
ID: 9639362
Fozy, are those credentials to the box or the DB?
0
 
LVL 9

Expert Comment

by:bhagyesht
ID: 9639543
you can connect most databases which have a server ie SQL server, MySql, oracle those that dont have a server component cannot be connected directly ie access/foxpro/txt.
if you want to connect access then you need to do it using VPN
0
 
LVL 9

Expert Comment

by:bhagyesht
ID: 9640355
if yoiu want to use access you can use it via msde this will treat access database as an sql server
0
 
LVL 8

Expert Comment

by:fozylet
ID: 9642911
cookre:

those are for the db (i.e. uid/pwd)
no need to logon to the box to access the sql server

0
 
LVL 8

Expert Comment

by:fozylet
ID: 9642930
Const ConnStrWeb   = "Server=172.21.9.39;Provider=SQLOLEDB;Database=cmsmaster;UID=web_user;password=pwd007"

This is a connection string i use for SQL server
but it is intranet (not internet). Guess that should work for internet too.
0
 
LVL 8

Expert Comment

by:fozylet
ID: 9642942
moko:

please maintain your questions

Questions Asked  7
Questions Open  5
Questions Graded:  2
Questions Deleted:  0
Last 10 Grades Given:  B A
0
 
LVL 9

Accepted Solution

by:
bhagyesht earned 500 total points
ID: 9647817
moko: can we have some feedback?
0

Featured Post

[Webinar] How Hackers Steal Your Credentials

Do You Know How Hackers Steal Your Credentials? Join us and Skyport Systems to learn how hackers steal your credentials and why Active Directory must be secure to stop them. Thursday, July 13, 2017 10:00 A.M. PDT

Question has a verified solution.

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

Whether you've completed a degree in computer sciences or you're a self-taught programmer, writing your first lines of code in the real world is always a challenge. Here are some of the most common pitfalls for new programmers.
In this post we will learn how to connect and configure Android Device (Smartphone etc.) with Android Studio. After that we will run a simple Hello World Program.
With the power of JIRA, there's an unlimited number of ways you can customize it, use it and benefit from it. With that in mind, there's bound to be things that I wasn't able to cover in this course. With this summary we'll look at some places to go…
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…

623 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