Solved

How to access a Remote Database

Posted on 2002-05-24
3
120 Views
Last Modified: 2010-05-02
I want to make a small program in VB 6 and SQL Server 2000 to access a database on a computer in different city. What are the things to be taken under consideration.

And also, please give example in code. Suppose a databse is located on my home computer and there is an internet
connection. Can anyone located in different city have access to the database in my computer.

Rohit.
0
Comment
Question by:rpk2006
3 Comments
 
LVL 142

Expert Comment

by:Guy Hengel [angelIII / a3]
Comment Utility
If you can ping to the remote server, half of the game is done. The connection string in VB would simply use the IP address instead the servername, although if the remote computer is know by name also, this will work:

dim c as ADODB.Connection
set c = new ADODB.Connection
c.Open "Provider=SQLOLEDB;Server=<remoteservername or ip>;database=<databasename>;uid=<user id>;pwd=<password>;"
....
c.Close
set c = nothing

Now, if you have a firewall or proxy blocking the traffic over some ports, you should check with the network administrators to open those ports as necessary (default=1433):
http://support.microsoft.com/default.aspx?scid=kb;EN-US;q287932

CHeers
0
 
LVL 28

Accepted Solution

by:
vinnyd79 earned 100 total points
Comment Utility
0
 

Author Comment

by:rpk2006
Comment Utility
Thanks Angelll and Vinnyd.
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

Introduction In a recent article (http://www.experts-exchange.com/A_7811-A-Better-Concatenate-Function.html) for the Excel community, I showed an improved version of the Excel Concatenate() function.  While writing that article I realized that no o…
The debugging module of the VB 6 IDE can be accessed by way of the Debug menu item. That menu item can normally be found in the IDE's main menu line as shown in this picture.   There is also a companion Debug Toolbar that looks like the followin…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…

762 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