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
Solved

Connecting to a remote database ....

Posted on 2003-10-28
10
256 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
  • 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
Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

 
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

Free Tool: Postgres Monitoring System

A PHP and Perl based system to collect and display usage statistics from PostgreSQL databases.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

This article is meant to give a basic understanding of how to use R Sweave as a way to merge LaTeX and R code seamlessly into one presentable document.
A short article about a problem I had getting the GPS LocationListener working.
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…

856 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