Connecting to a remote database ....

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 ?
mokoAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

cookreCommented:
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
Éric MoreauSenior .Net ConsultantCommented:
0
fozyletCommented:
"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
Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

cookreCommented:
Fozy, are those credentials to the box or the DB?
0
bhagyeshtCommented:
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
bhagyeshtCommented:
if yoiu want to use access you can use it via msde this will treat access database as an sql server
0
fozyletCommented:
cookre:

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

0
fozyletCommented:
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
fozyletCommented:
moko:

please maintain your questions

Questions Asked  7
Questions Open  5
Questions Graded:  2
Questions Deleted:  0
Last 10 Grades Given:  B A
0
bhagyeshtCommented:
moko: can we have some feedback?
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Programming

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.