Solved

How to access a Remote Database

Posted on 2002-05-24
3
124 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
[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
3 Comments
 
LVL 143

Expert Comment

by:Guy Hengel [angelIII / a3]
ID: 7031503
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
ID: 7031920
0
 

Author Comment

by:rpk2006
ID: 7032486
Thanks Angelll and Vinnyd.
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

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

Background What I'm presenting in this article is the result of 2 conditions in my work area: We have a SQL Server production environment but no development or test environment; andWe have an MS Access front end using tables in SQL Server but we a…
I was working on a PowerPoint add-in the other day and a client asked me "can you implement a feature which processes a chart when it's pasted into a slide from another deck?". It got me wondering how to hook into built-in ribbon events in Office.
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
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…

756 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