Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

How to access a Remote Database

Posted on 2002-05-24
3
Medium Priority
?
128 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 300 total points
ID: 7031920
0
 

Author Comment

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

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Question has a verified solution.

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

If you have ever used Microsoft Word then you know that it has a good spell checker and it may have occurred to you that the ability to check spelling might be a nice piece of functionality to add to certain applications of yours. Well the code that…
Article by: Martin
Here are a few simple, working, games that you can use as-is or as the basis for your own games. Tic-Tac-Toe This is one of the simplest of all games.   The game allows for a choice of who goes first and keeps track of the number of wins for…
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…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
Suggested Courses

688 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