Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

How to access a Remote Database

Posted on 2002-05-24
3
Medium Priority
?
129 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 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 Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

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

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…
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…
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…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
Suggested Courses

886 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