Solved

Connecting to a remote database ....

Posted on 2003-10-28
10
227 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
Comment Utility
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 69

Expert Comment

by:Éric Moreau
Comment Utility
0
 
LVL 8

Expert Comment

by:fozylet
Comment Utility
"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
 
LVL 22

Expert Comment

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

Expert Comment

by:bhagyesht
Comment Utility
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
Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

 
LVL 9

Expert Comment

by:bhagyesht
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
moko: can we have some feedback?
0

Featured Post

Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

Join & Write a Comment

Suggested Solutions

A short article about a problem I had getting the GPS LocationListener working.
If you’re thinking to yourself “That description sounds a lot like two people doing the work that one could accomplish,” you’re not alone.
An introduction to basic programming syntax in Java by creating a simple program. Viewers can follow the tutorial as they create their first class in Java. Definitions and explanations about each element are given to help prepare viewers for future …
In this fourth video of the Xpdf series, we discuss and demonstrate the PDFinfo utility, which retrieves the contents of a PDF's Info Dictionary, as well as some other information, including the page count. We show how to isolate the page count in a…

772 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

10 Experts available now in Live!

Get 1:1 Help Now